如何在Jetty的/*上映射servlet过滤器? [英] How to map a servlet filter on /* in Jetty?
本文介绍了如何在Jetty的/*上映射servlet过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个servlet过滤器,我想映射到 http://127.0.0.1:8888/在码头.我已将servlet过滤器映射与url模式/*
一起放置.但是,不调用过滤器.我还尝试了/
映射.它也不起作用.这是怎么引起的,我该如何解决?
I have a servlet filter which I want to map to http://127.0.0.1:8888/ in Jetty. I have put a servlet filter mapping with url pattern /*
. However, the filter is not called. I also tried with /
mapping. It does not work either. How is this caused and how can I solve it?
推荐答案
如果您将战争命名为root.war
,它将被部署到根目录/上下文中.
If you name your war root.war
it will be deployed to the root / context.
http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications
这篇关于如何在Jetty的/*上映射servlet过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文