`
文艺的程序猿
  • 浏览: 98828 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Struts2_DefaultActionRel_Bug解决方法

阅读更多
struts.xml配置文件如下:
<package name="front" namespace="/" extends="struts-default" >
    <!-- <default-action-ref name="index"/>  --> <!-- bug!!! -->
    <default-action-ref name="index"/>
       <action name="index" class="com.bjsxt.bbs2009.action.CategoryAction" method="list">
       <result>/index.jsp</result>
       </action>
</package>
   

在web.xml中,如
  <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

方法一:在web.xml中将index.jsp改成index可解决

方法二:在web.xml中将index.jsp改成test.jsp。这样在项目中找不到test.jsp主页,default-action-ref默认action将起到作用。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics