日期:2014-05-19  浏览次数:20838 次

如何在html页面中使用struts2中的页面XXX.action的跳转
谢谢啦

------解决方案--------------------
在form表单action中写入跳转地址,再在struts.xml文件中进行配置,页面就可以跳转到指定页面了!!
------解决方案--------------------
jsp:
<s:form action="namespace/xxx.action" method="post" id="search" >

window.location.href="../namespace/xxx.action";

<a href="namespace/xxx.action">tiaozhuan</a>
struts.xml:
<package name="ssss" extends="struts-default" namespace="/namespace">

<action name="xxx" class="xxxaction" method="vvv">
------解决方案--------------------
html中的表单功能:
<form action="user/a.action" method="post">
user:<input type="text" name ="user"/><br/>

<input type="submit" value="提交">

</form>
这样点击提交的时候,自动往a.action上跳转,前面是a.action的路径。method是传输方式