struts2一旦使用constants就报错404 我是通过在struts.xml文件中加constants的。但是一加上就报错。很莫名啊!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在struts.xml中加入:<constant name="struts.action.extension" value="do" />在web.xml文件更改:<url-pattern>*.do</url-pattern>然后submit的时候就报错404了。茫然! 1.http://localhost:8080/xxx/login使用struts2默认后缀名,struts2默认配置struts.action.extension=action,,。即action或者不写。http://localhost:8080/xxx/login和http://localhost:8080/xxx/login.action都能正常访问。2.struts.action.extension=do是你自定义后缀名必须加do即:http://localhost:8080/xxx/login.do 定位 //TODO的快捷键是什么? jsf 标签 id 怎样调用数据库中的下拉菜单 数列求值 一个简单的中文乱码问题!!!!! Struts简单的概念问题。 数据更新的问题 关于数据库的一个搞笑问题 struts用DataSource数据源建立连接池,获得连接后,怎么把连接返回连接池!! 关于JSP的开发工具的请教. javax.servlet包找不到? 为什么不能取得论坛的id号?
<constant name="struts.action.extension" value="do" />在web.xml文件更改:
<url-pattern>*.do</url-pattern>然后submit的时候就报错404了。茫然!
http://localhost:8080/xxx/login使用struts2默认后缀名,struts2默认配置struts.action.extension=action,,。
即action或者不写。
http://localhost:8080/xxx/login
和
http://localhost:8080/xxx/login.action都能正常访问。2.
struts.action.extension=do是你自定义后缀名必须加do
即:http://localhost:8080/xxx/login.do