开发者

Tomcat 404 error in Eclipse - For any page except Welcome page

开发者 https://www.devze.com 2023-04-06 21:45 出处:网络
I am trying to run a开发者_如何学编程 website in Eclipse using Tomcat, but I just can view the welcome page. Any link or URL to other pages bring error 404. What I\'ve done so far:

I am trying to run a开发者_如何学编程 website in Eclipse using Tomcat, but I just can view the welcome page. Any link or URL to other pages bring error 404. What I've done so far:

  • I use a Dynamic Web Project, with some jsp pages. There are no errors in the files.
  • I've tried Tomcat 6 & 7 servers, and I can see the tomcat default page (http://localhost:8080).
  • Everything seem fine in Tomcat server configurations, including HTTP port, Arguments, etc.
  • When I run the server, I'm able to see the Welcome page using http://localhost:8080/.
  • When I click on a link to another page in directory (ref to http://localhost:8080//), or I redirect to http://localhost:8080// I receive the 404 error.
  • I tried cleaning server, running new servers, renaming web file names, etc; but the problem remains.
  • The files also seem OK in the Tomcat wtpwebapps folder.

The website Web.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>ERF_Prototype</display-name>
  <welcome-file-list>
    <welcome-file>/WEB-INF/Prototype.jsp</welcome-file>
  </welcome-file-list>
</web-app>

Any Idea how to solve the problem? Thanks

Update----------------------------------------------------------------

Problem not solved; I am just trying to avoid it by exporting website to .War, and then import it using tomcat manager.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号