Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 struts2 设计了一个应用程序,例如需要删除扩展
www.myweb.com/register.action
如何删除 .action 以便当我单击注册时调用 www.myweb.com/register 而不使用操作扩展名?
我使用以下
<a href="<s:url action="register"/>">Register</a>
我找到了答案。我应该改变struts配置如下:
<struts> <constant name="struts.action.extension" value=""/> <package name="default" extends="struts-default"> <action name="register"> <result type="tiles">register</result> </action> </package> </struts>