Struts2 seo-friendly url?

为君一笑 提交于 2019-12-01 01:52:34
Steven Benitez

Yes, you can do this out-of-the-box with Struts2. Check out the NamedVariablePatternMatcher, which I described here.

In your case, you would need to enable the options in the answer that I linked to above and then map your action as:

<action name="users/{login}" class="...">
    ...
</action>

You could also look into the rest plug-in.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!