struts2中拦截器中也无处理,没有做任何拦截或者验证是怎么回事?

如题所述

重定向有好几种实现方式......一种是在struts.xml中重定向......
<action name="login" class="retmt LoginAction" method="login">
<result name="success" type="redirect">../inbox/inboxUser.do</result>
<result name="failure">/index.jsp</result>
</action>
但是要注意type属性的值。那四个值的区别你可以去网上看看....
还有一种方式是response
HttpServletResponse response = ServletActionContext.getResponse();
response.sendRedirect("../seed/seedList.do?userName="+userName);
你看看你用的是哪一种......如果用的是上面的一种的话很有可能是type属性的值的问题啦......
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答