Tomcat URL mapping individual servlet to root level

落花浮王杯 提交于 2020-02-08 02:39:28

问题


This should be a quickie; just need an answer on short notice...

I'm having to do a bit of maintenance on a webapp deployed under Tomcat 5.5.16 (behind IIS). It's currently set up with URLs in this format:

http://server.com/myapp/UglyServletName1

...and they just want it to be

http://server.com/Friendly

Obviously the servlet-mapping tag in web.xml isn't enough to map the URL outside of /myapp. Basically, I just need to know -- is there a trivial way to do this as a url-pattern or similar mapping within Tomcat, or is it easier to do it in IIS (or the Jakarta ISAPI plugin, for that matter)?


回答1:


You can use Tuckey's URL Rewrite Filter.



来源:https://stackoverflow.com/questions/10427347/tomcat-url-mapping-individual-servlet-to-root-level

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