cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From duncan_mcl...@blueyonder.co.uk
Subject Re: Antwort: Calling servlet from Pipeline - session lost?
Date Wed, 14 Sep 2005 09:30:34 GMT
Hi Holger

This confirms what we were thinking.

Thanks for taking the time to answer.

Duncan

> 1. In the pipeline, the cocoon app is the client which requests the data.
> The cocoon app obviusly doesn't maintain a session connection.
>
> 2. If the servlet is not in the Cocoon context, it will not share the
> session with the Cocoon app.
>
> 3. If you put the servlet into the Cocoon app, they should use the same
> session, so you should be able to share data and to maintain the state.
>
> 4. If you put the servlet into the cocoon app anyway, then you might think
> about making the servlet code serving the XML in a cocoon-specific way,
> e.g. as a generator.
>
> Hope this helps.
> Holger
>
> users-return-82150-holger.willenborg=armacell.com@cocoon.apache.org
> schrieb am 10.09.2005 16:26:44:
>
>> Cocoon version: 2.0.4
>> Tomcat 4.1.27
>> JVM: 1.3.1
>> OS: AIX 5.1
>>
>> Hi
>>
>> We are trying to incorporate xml emitted from a servlet into an
>> aggregation in a pipeline.
>>
>> i.e
>> <map:match pattern="mypage">
>>     ~
>>     ~
>>     ~
>>
>> <map:act type="request">
>>   <map:parameter name="parameters" value="true"/>
>>
>>     <map:generate
> src="http://myserver/myservlet/servlet{requestQuery}"/>
>>     ~
>>     ~
>>     ~
>> </map:act>
>>  ~
>>  ~
>> </map:match>
>>
>> We have (partially) managed to do this, but unfortunately the java
>> servlet we are calling uses the session to store and retrieve variables
>> (get- and setAttribute) in response to the
>> various parameters that are sent to it in the URI. Between each visit to
>
>> the servlet, the servlet cannot maintain state so the returned XML is
>> not correct.
>>
>> I would greatly appreciate it if someone could (in layman's terms
>> please, as that is what I am!) explain:
>>
>> 1) Why this happens
>> 2) Any way around this, or is a re-write of the servlet/solution in
> order?
>>
>> Thanks in advance
>>
>> Duncan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message