May 212010
工程中用到了struts2,index.jsp中使用jsp:forward命令跳转来执行action,web.xml中需要做如下配置:
<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>
不明白为什么要这样配置,有时间好好研究一下。如果觉得配置web.xml很麻烦,不如使用jstl的redirect标签来跳转,可以达到一样的效果。
<c:redirect url="/login.action"></c:redirect>
朋友推荐过来的…文章有深度.
有时间常来看看啊,博客不旬!
纯代码文章
额,文章就是代码,代码就是文章
我的博客也不错 嘿嘿 就是没人看。没什么说的,我都感觉自己写的内容都在老调重弹。还是你的www.ooobj.com犀利点…