【发布时间】:2013-09-13 14:15:41
【问题描述】:
如何摆脱 .do 并在我的应用程序的 url 中查询字符串路径?想法是让网站更加 SEO 和用户友好。
我想走这条路:
http://something.com/myaction.do?id=1&ground=B
进入:
http://something.com/myaction/1/B
知道如何开始吗?谢谢
【问题讨论】:
-
我只用过struts2。在这种情况下,您可以通过覆盖 struts.xml 文件中的 struts.action.extension 常量来实现。所以可能在 struts 中也有类似的。
标签: java url url-rewriting struts clean-urls