You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Franosch, Heike" <fr...@bms.de> on 2002/04/19 10:55:37 UTC
Session handling cocoon - servlet - stylesheet solved
Hi all,
thanks to Vadim, I got it running.
My situation: I already have a servlet that outputs xml data and I want
to use cocoon to select dynamically the suitable stylesheet. I have to
put the session-id to the output document (inserting through xsl) and
handling my session data in my servlet.
It took some time for me to understand how all this should work (and a
lot of patience from Vadim ;-)
I attach my working code, just in case someone wants to do a similar
thing and is in need of some example code.
Things I had to be aware of:
1) It is important that my servlet is deployed under the same context path
as cocoon, otherwise the session handling won't do.
2) The MyRequestAction is necessary to create a session and make it
available to the sitemap, so the id can be accessed through the
stylesheet and cat be manually attached to the servlet URL
3) I know this is not the "normal" way of using cocoon, but it works, and
it is really great ;-))
Thank you all
Heike
RE: Session handling cocoon - servlet - stylesheet solved
Posted by Chitharanjan Das <cd...@accordiasys.com>.
Thanks for the effort...
1 question though, did U have to register the servlet in the web.xml.
Id so could U hust show the listing of your web.xml as well..
Regds,
Chiths
-----Original Message-----
From: Franosch, Heike [mailto:franosch@bms.de]
Sent: Friday, April 19, 2002 1:56 AM
To: cocoon-users@xml.apache.org
Subject: Session handling cocoon - servlet - stylesheet solved
Hi all,
thanks to Vadim, I got it running.
My situation: I already have a servlet that outputs xml data and I want
to use cocoon to select dynamically the suitable stylesheet. I have to
put the session-id to the output document (inserting through xsl) and
handling my session data in my servlet.
It took some time for me to understand how all this should work (and a
lot of patience from Vadim ;-)
I attach my working code, just in case someone wants to do a similar
thing and is in need of some example code.
Things I had to be aware of:
1) It is important that my servlet is deployed under the same context
path
as cocoon, otherwise the session handling won't do.
2) The MyRequestAction is necessary to create a session and make it
available to the sitemap, so the id can be accessed through the
stylesheet and cat be manually attached to the servlet URL
3) I know this is not the "normal" way of using cocoon, but it works,
and
it is really great ;-))
Thank you all
Heike
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>