简体   繁体   中英

URL characters replacement in JSP with UrlRewrite

I am using UrlRewrite in a JSP project over JBoss . I have configured some rules, so that stuff like:

http://mysite/parameter

Is read as:

http://mysite/index.jsp?parameter=parameter

And so on.

Now, what I would like to know if there's a way to replace certain characters submitted in the URL by the users with others. Something like what Wikipedia does. When you use a space in the URL in WikiPedia, it's replaced by a "-".

Is UrlRewrite the right tool for this? I also have a few filters around, but I guess I shoul be able to accomplish this with UrlRewrite or a similar tool.

万一有人需要做同样的事情,我发现可以使用Servlet来过滤URL,response.sendRedirect()和request.getRequestDispatcher()。forward()。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM