Tomcat URL将单个servlet映射到根级别 [英] Tomcat URL mapping individual servlet to root level

查看:102
本文介绍了Tomcat URL将单个servlet映射到根级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是一个快速反应;只是需要在短时间内得到答案...

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

我必须对在Tomcat 5.5.16(位于IIS之后)下部署的Web应用程序进行一些维护.目前已使用以下格式的网址进行了设置:

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

显然,web.xml中的servlet-mapping标签不足以将URL映射到/myapp之外.基本上,我只需要知道-是否有一种简单的方法来完成此操作,例如将其作为Tomcat中的url-pattern或类似的映射,还是在IIS(或Jakarta ISAPI插件)中更容易做到呢? /p>

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)?

推荐答案

您可以使用 Tuckey的URL重写过滤器.

这篇关于Tomcat URL将单个servlet映射到根级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆