You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by raul_b <ra...@gmail.com> on 2008/07/03 17:50:13 UTC
servlet issues with camel..
Hi,
I'm new in Camel, so excuses if the answers are obvious.. :)
I'm using camel 1.3, and creating a route of the type
from("jetty:http://...").process(new ProcessorClass());
Inside the ProcessorClass i'm trying to get hold of the servlet session:
void process(Exchange exchange) {
...
HttpSession session =
((HttpExchange)exchange).getRequest().getSession();
...
}
It fails miserably with a "java.lang.IllegalStateException: No
SessionHandler or SessionManager". I'm wondering why this happens.. Is this
a way to solve this problem?
Can I, within Camel, get all the functionality provided by the servlets API?
>From this example, regarding sessions, it doesn't seem like..
Or am I missing something here?
Thanks,
Raul
--
View this message in context: http://www.nabble.com/servlet-issues-with-camel..-tp18261581s22882p18261581.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: servlet issues with camel..
Posted by raul_b <ra...@gmail.com>.
Thanks for the fast reaction!
Raul
willem.jiang wrote:
>
> Done.
>
> https://issues.apache.org/activemq/browse/CAMEL-666
>
>
> Willem
>
>
> Claus Ibsen wrote:
>> Willem
>>
>> Please add a ticket for this request. Getting hold on the http session
>> can be important for end-users, so it makes sense to support this
>> out-of-the-box as easy as possible.
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>> -----Original Message-----
>> From: Willem Jiang [mailto:willem.jiang@gmail.com]
>> Sent: 4. juli 2008 09:50
>> To: camel-user@activemq.apache.org
>> Subject: Re: servlet issues with camel..
>>
>> AFIK, You need to set the session manager in Jetty , then you can get
>> the HttpSession instance from the Request.
>> Maybe we need add a option for Jetty http component.
>>
>> Willem.
>>
>> raul_b wrote:
>>
>>> Hi,
>>> I'm new in Camel, so excuses if the answers are obvious.. :)
>>>
>>> I'm using camel 1.3, and creating a route of the type
>>> from("jetty:http://...").process(new ProcessorClass());
>>>
>>> Inside the ProcessorClass i'm trying to get hold of the servlet session:
>>>
>>> void process(Exchange exchange) {
>>> ...
>>> HttpSession session =
>>> ((HttpExchange)exchange).getRequest().getSession();
>>> ...
>>> }
>>>
>>> It fails miserably with a "java.lang.IllegalStateException: No
>>> SessionHandler or SessionManager". I'm wondering why this happens.. Is
>>> this
>>> a way to solve this problem?
>>>
>>> Can I, within Camel, get all the functionality provided by the servlets
>>> API?
>>> >From this example, regarding sessions, it doesn't seem like..
>>>
>>> Or am I missing something here?
>>>
>>> Thanks,
>>> Raul
>>>
>>>
>>
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/servlet-issues-with-camel..-tp18261581s22882p18275893.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: servlet issues with camel..
Posted by Willem Jiang <wi...@gmail.com>.
Done.
https://issues.apache.org/activemq/browse/CAMEL-666
Willem
Claus Ibsen wrote:
> Willem
>
> Please add a ticket for this request. Getting hold on the http session can be important for end-users, so it makes sense to support this out-of-the-box as easy as possible.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> Sent: 4. juli 2008 09:50
> To: camel-user@activemq.apache.org
> Subject: Re: servlet issues with camel..
>
> AFIK, You need to set the session manager in Jetty , then you can get
> the HttpSession instance from the Request.
> Maybe we need add a option for Jetty http component.
>
> Willem.
>
> raul_b wrote:
>
>> Hi,
>> I'm new in Camel, so excuses if the answers are obvious.. :)
>>
>> I'm using camel 1.3, and creating a route of the type
>> from("jetty:http://...").process(new ProcessorClass());
>>
>> Inside the ProcessorClass i'm trying to get hold of the servlet session:
>>
>> void process(Exchange exchange) {
>> ...
>> HttpSession session =
>> ((HttpExchange)exchange).getRequest().getSession();
>> ...
>> }
>>
>> It fails miserably with a "java.lang.IllegalStateException: No
>> SessionHandler or SessionManager". I'm wondering why this happens.. Is this
>> a way to solve this problem?
>>
>> Can I, within Camel, get all the functionality provided by the servlets API?
>> >From this example, regarding sessions, it doesn't seem like..
>>
>> Or am I missing something here?
>>
>> Thanks,
>> Raul
>>
>>
>
>
>
RE: servlet issues with camel..
Posted by Claus Ibsen <ci...@silverbullet.dk>.
Willem
Please add a ticket for this request. Getting hold on the http session can be important for end-users, so it makes sense to support this out-of-the-box as easy as possible.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com]
Sent: 4. juli 2008 09:50
To: camel-user@activemq.apache.org
Subject: Re: servlet issues with camel..
AFIK, You need to set the session manager in Jetty , then you can get
the HttpSession instance from the Request.
Maybe we need add a option for Jetty http component.
Willem.
raul_b wrote:
> Hi,
> I'm new in Camel, so excuses if the answers are obvious.. :)
>
> I'm using camel 1.3, and creating a route of the type
> from("jetty:http://...").process(new ProcessorClass());
>
> Inside the ProcessorClass i'm trying to get hold of the servlet session:
>
> void process(Exchange exchange) {
> ...
> HttpSession session =
> ((HttpExchange)exchange).getRequest().getSession();
> ...
> }
>
> It fails miserably with a "java.lang.IllegalStateException: No
> SessionHandler or SessionManager". I'm wondering why this happens.. Is this
> a way to solve this problem?
>
> Can I, within Camel, get all the functionality provided by the servlets API?
> >From this example, regarding sessions, it doesn't seem like..
>
> Or am I missing something here?
>
> Thanks,
> Raul
>
Re: servlet issues with camel..
Posted by Willem Jiang <wi...@gmail.com>.
AFIK, You need to set the session manager in Jetty , then you can get
the HttpSession instance from the Request.
Maybe we need add a option for Jetty http component.
Willem.
raul_b wrote:
> Hi,
> I'm new in Camel, so excuses if the answers are obvious.. :)
>
> I'm using camel 1.3, and creating a route of the type
> from("jetty:http://...").process(new ProcessorClass());
>
> Inside the ProcessorClass i'm trying to get hold of the servlet session:
>
> void process(Exchange exchange) {
> ...
> HttpSession session =
> ((HttpExchange)exchange).getRequest().getSession();
> ...
> }
>
> It fails miserably with a "java.lang.IllegalStateException: No
> SessionHandler or SessionManager". I'm wondering why this happens.. Is this
> a way to solve this problem?
>
> Can I, within Camel, get all the functionality provided by the servlets API?
> >From this example, regarding sessions, it doesn't seem like..
>
> Or am I missing something here?
>
> Thanks,
> Raul
>