MASTERJ2EE article 001--start tomcat error server tomcat v7.0 server at localhost failed to start

Source: Internet
Author: User

In Eclipse start server error server Tomcat v7.0 server at localhost failed to start. But it's all good.

The first thing to think about is that you should close the exception last time and reboot. So go to the Tomcat/bin directory and execute the./shutdown.sh again./startup.sh.

./shutdown.sh when Tomcat tips

November 05, 2016 1:44:57 am Org.apache.catalina.startup.Catalina stopserver

Critical: Could not contact localhost:8005. Tomcat May is not running.

November 05, 2016 1:44:57 am Org.apache.catalina.startup.Catalina stopserver

Severity: catalina.stop:

Java.net.ConnectException:Connection refused (Connection refused)

This is because Tomcat is still off and you'll have this hint when you close it.

The direct execution of the startup.sh started successfully, and then shutdown.sh also succeeded.

Think carefully, the Eclipse Server window start and direct command start should not be much difference

The difference I know is that because of the setup, the Eclipse Server window will throw my project into Tomcat and the command will not start. So there should be a problem with the URL pattern configured in Web. Xml.

Opening web. XML looked as if it were the problem. I wrote it.

<servlet-mapping>

<servlet-name>dispatcherServlet</servlet-name>

<url-pattern>/*.htm</url-pattern>

</servlet-mapping>

Url-pattern does not support such a notation. Can be written as an. htm or write AS/. Next chapter Url-pattern things.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.