如果你在action中使用forward转发请求到jsp页面,应该可以获得设置的参数。但如果你使用redirect重定向,那在jsp页面中将不能获得在action中设置的参数。通过配置文件可设置是使用forward还是使用redirect.例如,在struts-config.xml中<action path="/example" type="myclass.example">
<forward name="success" path="/example.jsp" redirect="true"/>
</action>如果你要使用forward,则设置redirect="false"。
<forward name="success" path="/example.jsp" redirect="true"/>
</action>如果你要使用forward,则设置redirect="false"。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货