zl程序教程

您现在的位置是:首页 >  其他

当前栏目

myeclipse 右键 Add Struts... 页面报404 错误

错误 页面 ... add 右键 myeclipse 404 struts
2023-09-14 08:58:22 时间

 

 

网上试了很多种方法都不对,结果老师两下点出来了

我的改正方法是:

  将WebRoot/WEB-INF/web.xml中的 <url-pattern>/*</url-pattern> 改为 <url-pattern>*.do</url-pattern>

  然后再网页中输入完整的路径 "项目/index.jsp" 就不会报错了

  最后在把“*.do ”该成“/*”

据说是加了struts之后 默认查找路径是 "项目\do"