cindylebron
2017-06-06 15:03web程序在eclipse中运行报错404
javaweb项目,成功配置Tomcat,之前可以运行登录界面(index.jsp),其他界面的跳转实现不了(404错误),后来Tomcat服务器启动错误,按网上的方法改了server.xml文件中的context行为绝对路径,现在服务器可以启动,但是每个页面都报404错误,求解原因。
可能是web.xml文件有误,也可以是servlet代码部分有问题。
附上各部分代码和目录:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
This is the description of my J2EE component
This is the display name of my J2EE component
RegisterAction
com.register.RegisterAction
This is the description of my J2EE component
This is the display name of my J2EE component
LoginAction
com.login.LoginAction
This is the description of my J2EE component
This is the display name of my J2EE component
ProductAction
com.product.ProductAction
This is the description of my J2EE component
This is the display name of my J2EE component
LogoutAction
com.logout.LogoutAction
RegisterAction
/servlet/RegisterAction
LoginAction
/servlet/LoginAction
ProductAction
/servlet/ProductAction
LogoutAction
/servlet/LogoutAction
<!-- 配置 过滤器 -->
MyFilter
com.filter.MyFilter
MyFilter
<!-- /*表示过滤所有页面 ,/main.jsp 表示只过滤main.jsp页面-->
/main.jsp
MyFilter
<!-- /*表示过滤所有页面 /addProduct.jsp 表示只过滤addProduct.jsp页面-->
/addProduct.jsp
index.jsp
小女子肝404错误熬了几个晚上了,大作业眼看就要交了,求大神解答~
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- eclipse软件中java编程两个一样的代码为什么会报错?
- java
- 1个回答
- eclipse 启动Spring boot 程序报错 Failed to refresh data from proccess 33356
- spring
- java
- eclipse
- 4个回答
- 正常运行的SpringBoot项目,考到另一台电脑上报错:
- spring
- java
- 7个回答
- Eclipse通过Tomcat运行项目不成功。
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 0个回答
- 请问如何对依赖项目进行测试?
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 0个回答