1
Struts2中<html:rewrite>
标签的等效代码是什么?<html:rewrite page =“”>标签在Struts 2中相当于
<html:rewrite page="/MyAction.action">
Struts2中<html:rewrite>
标签的等效代码是什么?<html:rewrite page =“”>标签在Struts 2中相当于
<html:rewrite page="/MyAction.action">
您可以使用url
标记来构建url,这相当于html重写标记。
<s:url var="myUrl" action="MyAction"/>
但是如果你需要重写URL,那么你可以使用路径
<s:url var="myUrl" value="/MyAction.action"/>
您可以输出在JSP与<s:property value="%{#myUrl}"/>
或${myUrl}
值在可能的情况。
您可以在Struts文档站点上阅读关于url tag的更多信息。
' '。你需要什么? –
我需要更改页面到基地uri http:// localhost:8081/myapp/control /的网站。例如,我试图改变点击一个按钮:http:// localhost:8081/myapp/control/myHomeAction.action到http:// localhost:8081/myapp/control/myNextPageAction.action – Ariana