struts2首页forward跳转后执行action

首先在WEB-XML里如下配置

<filter-mapping>
   <filter-name>struts2</filter-name>
   <url-pattern >/*</url-pattern>
<dispatcher>REQUEST</dispatcher>//1
    <dispatcher>FORWARD</dispatcher> //2  加多这两行就行了
</filter-mapping>       


-------------------------------------------------------------------

在页面上              



<jsp:forward page="index.action"></jsp:forward> 首页跳转语句

你可能感兴趣的:(html,xml,Web)