camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlee Chitsuk <charlee...@gmail.com>
Subject Re: [CAMEL-JETTY] How to manage filter-mapping?
Date Mon, 28 Mar 2016 07:49:50 GMT
Hi Willem,

Thank you very much for your reply.

If I have more than one resources, e.g "/myweb/foo" and "/myweb/bar". I
should define the route twice, right?

from("jetty:http://0.0.0.0:8080/myweb/foo" ...<with filter>..)

from("jetty:http://0.0.0.0:8080/myweb/bar" ...<without filter>...)

Could you please help to advise further?

--
   Best Regards,

   Charlee Ch.

2016-03-28 14:19 GMT+07:00 Willem Jiang <willem.jiang@gmail.com>:

> The filter is applied according to the path of the endpoint, if you just
> want to apply the filter to the “/myweb/foo/*”, you need to setup the jetty
> endpoint like this
> from(“jetty:http://0.0.0.0:8080/myweb/foo” + ...)
>
> --
> Willem Jiang
>
>
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On March 28, 2016 at 9:39:55 AM, Charlee Chitsuk (charlee.ch@gmail.com)
> wrote:
> > Hi,
> >
> > I'm trying to put the "servlet-filter" to the "camel-jetty" (version
> > 2.17.0). At the moment I config the route as the following: -
> >
> > from("jetty:http://0.0.0.0:8080/myweb"
> > + "?matchOnUriPrefix=true&"
> > + "filtersRef=my-filter&"
> > + "filterInit.key1=value1")
> >
> > Everything work great, the filter applies for "/myweb/*". Anyhow I would
> > like to apply the filter only for some path, e.g. "/myweb/foo/*".
> >
> > Regarding to the "web.xml", we are able to set the 'filter-mapping' by
> > providing the 'url-pattern', e.g.
> >
> >
> > my-filter
> > /foo/*
> >
> >
> >
> > I'm not sure if there is any configuration via the 'camel-jetty' or not.
> > Could you please help to advise further?
> >
> > --
> > Best Regards,
> >
> > Charlee Ch.
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message