开发者

Jsp auto forwarding

How I can to make auto forwarding from any dir to .jsp page with params, such as:

http://site.net/foo/ -> http://site.net/show.jsp?p=foo
http://site.net/foo2/ 开发者_运维技巧-> http://site.net/show.jsp?p=foo2
http://site.net/foo3/ -> http://site.net/show.jsp?p=foo3
http://site.net/foo4/ -> http://site.net/show.jsp?p=foo4


You can use UrlRewriterFilter to achieve this (MVC independent, since I don't know how you're implementing your webapp).


If you are using your app server behind Apache you can achieve this with mod_rewrite.

http://httpd.apache.org/docs/current/mod/mod_rewrite.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜