You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by pevgen <pe...@km.ru> on 2009/03/12 17:32:17 UTC
jetty-component : many context paths
Hello.
How can i get a jetty-endpoint with many context paths ?
for example, i want to get requests on http://localhost:1234/base/path1 and
http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime paths
(from 1 to .... many :)).
if i configured the endpoint as "jetty:http://localhost:1234/base", then i
got jetty http 404 error.
Thanks
Evgeny
--
View this message in context: http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: jetty-component : many context paths
Posted by pevgen <pe...@km.ru>.
Thanks.
but only version 2.0 have this property(matchOnUriPrefix)...
Evgeny
Claus Ibsen-2 wrote:
>
> On Fri, Mar 13, 2009 at 9:22 AM, Willem Jiang <wi...@gmail.com>
> wrote:
>> Hi,
>>
>> You just need to set opetion matchOnUriPrefix[1] to be true, then all
>> the request to jetty:http://localhost:1234/base/* will came to your
>> jetty endpoint first.
>>
>> [1] http://camel.apache.org/jetty.html
> Cool, I didnt know this feature.
>
>
>>
>> Willem
>>
>>
>> pevgen wrote:
>>> Thank you, Bruno.
>>>
>>> But i think, that i could't explain my problem :)
>>>
>>> if i create a "direct:path" (like "jetty:http://localhost:1234/base"),
>>> then
>>> all requests like "...base/blablabla" can't process by the jetty
>>> endpoint.
>>>
>>> i want create http-router and route in-messages like
>>> if "path1" then {
>>> process1();}
>>> if "path2" {
>>> process2();}
>>> ...
>>> where path1 and path2 are context-paths....
>>>
>>> There are any councils ?
>>>
>>> Evgeny
>>>
>>>
>>>
>>> Bruno Borges wrote:
>>>> Isn't possible to do a "direct:path" and from there you multicast to
>>>> other
>>>> endpoints?
>>>>
>>>>
>>>>
>>>> Like:
>>>>
>>>> from("some:where").to("direct:path");
>>>>
>>>> String[] paths = getJettyPaths();
>>>>
>>>> from("direct:path").multicast(paths);
>>>>
>>>>
>>>> How about this?
>>>>
>>>> Bruno Borges
>>>> blog.brunoborges.com.br
>>>> +55 21 76727099
>>>>
>>>> "The glory of great men should always be
>>>> measured by the means they have used to
>>>> acquire it."
>>>> - Francois de La Rochefoucauld
>>>> Sent from: Rio de janeiro Rj Brazil.
>>>>
>>>> On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>>>>
>>>>> Hello.
>>>>>
>>>>> How can i get a jetty-endpoint with many context paths ?
>>>>> for example, i want to get requests on
>>>>> http://localhost:1234/base/path1and
>>>>> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
>>>>> paths
>>>>> (from 1 to .... many :)).
>>>>> if i configured the endpoint as "jetty:http://localhost:1234/base",
>>>>> then
>>>>> i
>>>>> got jetty http 404 error.
>>>>>
>>>>> Thanks
>>>>> Evgeny
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>> -----
>>>> Bruno Borges
>>>> blog.brunoborges.com.br
>>>> +55 21 76727099
>>>>
>>>> "The glory of great men should always be
>>>> measured by the means they have used to
>>>> acquire it."
>>>> - Francois de La Rochefoucauld
>>>>
>>>
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>
>
--
View this message in context: http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22533229.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: jetty-component : many context paths
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Mar 13, 2009 at 9:22 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi,
>
> You just need to set opetion matchOnUriPrefix[1] to be true, then all
> the request to jetty:http://localhost:1234/base/* will came to your
> jetty endpoint first.
>
> [1] http://camel.apache.org/jetty.html
Cool, I didnt know this feature.
>
> Willem
>
>
> pevgen wrote:
>> Thank you, Bruno.
>>
>> But i think, that i could't explain my problem :)
>>
>> if i create a "direct:path" (like "jetty:http://localhost:1234/base"), then
>> all requests like "...base/blablabla" can't process by the jetty endpoint.
>>
>> i want create http-router and route in-messages like
>> if "path1" then {
>> process1();}
>> if "path2" {
>> process2();}
>> ...
>> where path1 and path2 are context-paths....
>>
>> There are any councils ?
>>
>> Evgeny
>>
>>
>>
>> Bruno Borges wrote:
>>> Isn't possible to do a "direct:path" and from there you multicast to other
>>> endpoints?
>>>
>>>
>>>
>>> Like:
>>>
>>> from("some:where").to("direct:path");
>>>
>>> String[] paths = getJettyPaths();
>>>
>>> from("direct:path").multicast(paths);
>>>
>>>
>>> How about this?
>>>
>>> Bruno Borges
>>> blog.brunoborges.com.br
>>> +55 21 76727099
>>>
>>> "The glory of great men should always be
>>> measured by the means they have used to
>>> acquire it."
>>> - Francois de La Rochefoucauld
>>> Sent from: Rio de janeiro Rj Brazil.
>>>
>>> On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>>>
>>>> Hello.
>>>>
>>>> How can i get a jetty-endpoint with many context paths ?
>>>> for example, i want to get requests on
>>>> http://localhost:1234/base/path1and
>>>> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
>>>> paths
>>>> (from 1 to .... many :)).
>>>> if i configured the endpoint as "jetty:http://localhost:1234/base", then
>>>> i
>>>> got jetty http 404 error.
>>>>
>>>> Thanks
>>>> Evgeny
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>> -----
>>> Bruno Borges
>>> blog.brunoborges.com.br
>>> +55 21 76727099
>>>
>>> "The glory of great men should always be
>>> measured by the means they have used to
>>> acquire it."
>>> - Francois de La Rochefoucauld
>>>
>>
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Re: jetty-component : many context paths
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
You just need to set opetion matchOnUriPrefix[1] to be true, then all
the request to jetty:http://localhost:1234/base/* will came to your
jetty endpoint first.
[1] http://camel.apache.org/jetty.html
Willem
pevgen wrote:
> Thank you, Bruno.
>
> But i think, that i could't explain my problem :)
>
> if i create a "direct:path" (like "jetty:http://localhost:1234/base"), then
> all requests like "...base/blablabla" can't process by the jetty endpoint.
>
> i want create http-router and route in-messages like
> if "path1" then {
> process1();}
> if "path2" {
> process2();}
> ...
> where path1 and path2 are context-paths....
>
> There are any councils ?
>
> Evgeny
>
>
>
> Bruno Borges wrote:
>> Isn't possible to do a "direct:path" and from there you multicast to other
>> endpoints?
>>
>>
>>
>> Like:
>>
>> from("some:where").to("direct:path");
>>
>> String[] paths = getJettyPaths();
>>
>> from("direct:path").multicast(paths);
>>
>>
>> How about this?
>>
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>> Sent from: Rio de janeiro Rj Brazil.
>>
>> On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>>
>>> Hello.
>>>
>>> How can i get a jetty-endpoint with many context paths ?
>>> for example, i want to get requests on
>>> http://localhost:1234/base/path1and
>>> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
>>> paths
>>> (from 1 to .... many :)).
>>> if i configured the endpoint as "jetty:http://localhost:1234/base", then
>>> i
>>> got jetty http 404 error.
>>>
>>> Thanks
>>> Evgeny
>>> --
>>> View this message in context:
>>> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>> -----
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>>
>
Re: jetty-component : many context paths
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Mar 13, 2009 at 8:32 AM, pevgen <pe...@km.ru> wrote:
>
> Thank you, Bruno.
>
> But i think, that i could't explain my problem :)
>
> if i create a "direct:path" (like "jetty:http://localhost:1234/base"), then
> all requests like "...base/blablabla" can't process by the jetty endpoint.
>
> i want create http-router and route in-messages like
> if "path1" then {
> process1();}
> if "path2" {
> process2();}
> ...
> where path1 and path2 are context-paths....
I do not think camel-jetty supports multiple context paths on the same
jetty server.
eg as a workaround you can have multiple jetty servers using different
port numbers.
But feel free to create a JIRA ticket for the RFE so we can support
multiple content paths for the same jetty server.
http://camel.apache.org/support.html
>
> There are any councils ?
>
> Evgeny
>
>
>
> Bruno Borges wrote:
>>
>> Isn't possible to do a "direct:path" and from there you multicast to other
>> endpoints?
>>
>>
>>
>> Like:
>>
>> from("some:where").to("direct:path");
>>
>> String[] paths = getJettyPaths();
>>
>> from("direct:path").multicast(paths);
>>
>>
>> How about this?
>>
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>> Sent from: Rio de janeiro Rj Brazil.
>>
>> On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>>
>>>
>>> Hello.
>>>
>>> How can i get a jetty-endpoint with many context paths ?
>>> for example, i want to get requests on
>>> http://localhost:1234/base/path1and
>>> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
>>> paths
>>> (from 1 to .... many :)).
>>> if i configured the endpoint as "jetty:http://localhost:1234/base", then
>>> i
>>> got jetty http 404 error.
>>>
>>> Thanks
>>> Evgeny
>>> --
>>> View this message in context:
>>> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> -----
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>>
>
> --
> View this message in context: http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22491491.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Re: jetty-component : many context paths
Posted by pevgen <pe...@km.ru>.
Thank you, Bruno.
But i think, that i could't explain my problem :)
if i create a "direct:path" (like "jetty:http://localhost:1234/base"), then
all requests like "...base/blablabla" can't process by the jetty endpoint.
i want create http-router and route in-messages like
if "path1" then {
process1();}
if "path2" {
process2();}
...
where path1 and path2 are context-paths....
There are any councils ?
Evgeny
Bruno Borges wrote:
>
> Isn't possible to do a "direct:path" and from there you multicast to other
> endpoints?
>
>
>
> Like:
>
> from("some:where").to("direct:path");
>
> String[] paths = getJettyPaths();
>
> from("direct:path").multicast(paths);
>
>
> How about this?
>
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
> Sent from: Rio de janeiro Rj Brazil.
>
> On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>
>>
>> Hello.
>>
>> How can i get a jetty-endpoint with many context paths ?
>> for example, i want to get requests on
>> http://localhost:1234/base/path1and
>> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
>> paths
>> (from 1 to .... many :)).
>> if i configured the endpoint as "jetty:http://localhost:1234/base", then
>> i
>> got jetty http 404 error.
>>
>> Thanks
>> Evgeny
>> --
>> View this message in context:
>> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
> -----
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
--
View this message in context: http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22491491.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: jetty-component : many context paths
Posted by Bruno Borges <br...@gmail.com>.
Isn't possible to do a "direct:path" and from there you multicast to other
endpoints?
Like:
from("some:where").to("direct:path");
String[] paths = getJettyPaths();
from("direct:path").multicast(paths);
How about this?
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099
"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld
Sent from: Rio de janeiro Rj Brazil.
On Thu, Mar 12, 2009 at 1:32 PM, pevgen <pe...@km.ru> wrote:
>
> Hello.
>
> How can i get a jetty-endpoint with many context paths ?
> for example, i want to get requests on http://localhost:1234/base/path1and
> http://localhost:1234/base/path2. but 'path1' and 'path2' are runtime
> paths
> (from 1 to .... many :)).
> if i configured the endpoint as "jetty:http://localhost:1234/base", then
> i
> got jetty http 404 error.
>
> Thanks
> Evgeny
> --
> View this message in context:
> http://www.nabble.com/jetty-component-%3A-many-context-paths-tp22479524p22479524.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>