Java新手 页面跳转404

LiangSamBo 2018-01-11 03:43:12
使用eclipse oxygen
tomcat 8.5
jdk8

访问index.jsp没问题,点击跳转的时候出现404页面,以下为xml文件配置
-------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>zhavaWeb</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>

<servlet>
<servlet-name>loginServlet</servlet-name>
<servlet-class>co.yizao.web.LoginServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>loginServlet</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>
</web-app>

-----------------------------------------------------------------------
以下为servlet的名字
LoginServlet....
-----------------------------------------------------------------------
index.jsp页面为普通的form表单提交
action="login"
-----------------------------------------------------------------------
请大神求助,,会不会是tomcat配置问题之类的
...全文
789 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_41049856 2018-01-18
  • 打赏
  • 举报
回复
404错误时路径有问题 检查你跳转的路径
LiangSamBo 2018-01-11
  • 打赏
  • 举报
回复
页面为post表单提交 提交的action="login"

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧