Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the reason why the project failed to start tomcat and how to solve it?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

What are the reasons for the failure of the project start-up tomcat and how to solve it? most people do not understand the knowledge points of this article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article "what are the reasons for the failure of project start-up tomcat and how to solve it?"

1. There is a problem with the java configuration path.

Please configure the jdk path. For more information, please see the configuration of java path.

2. No tomcat driver has been added to the project.

(general hint: The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path falls into this category)

Solution: if tomcat is already installed, right-click build path- > Configure build path- > Java build path- > select Libraries-> click Add Library... on the right in eclipse. -> Server Runtime-> Select your own tomcat server-> Finish

3. The name of the servlet configured in the web.xml in the project is misspelled and cannot be recognized by tomcat.

(general console prompts java.util.concurrent.ExecutionException to belong to this problem)

Solution: check that your configured servlet name and path are correct.

4. The port is occupied

Generally due to the last abnormal shutdown of tomcat or eclipse, (Port 8080. Is already in use)

Solution:

① modifies the port number (certainly not recommended) in the Tomcat root directory / conf/Server.xml, so let's not mention it here.

② shuts down the occupied port process: go to the dos window (enter cmd in the search at the beginning of the computer)

Enter netstat-ano | findstr 8080 (8080 is the occupied port number, which is occupied)

After you enter, you can see that there are processes in use.

Then enter taskkill / pid 8080 / f (where 8080 is the last number in the process information in use)

Enter will show that the process has ended, and then restart tomcat.

③ enters the bin folder of the tomcat root directory, and double-click shutdown.bat to close all occupied ports.

The above is about the content of this article on "what is the reason for the failure of the project to start tomcat and how to solve it?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report