cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Daniel Ardolino <ma...@altersoft.com.ar>
Subject RE: Sessions (read please!)
Date Fri, 29 Nov 2002 17:32:59 GMT
First of all, thanks for answering!

Well, I'm using servlets, not XSPs (I know this are servlets too, but not
HttpServlets).  So, I'm using HttpServlets.  I'm doing just as you say to
put something in a session.  Then I try to restore this parameter from
another servlet.  This is the snip of the configuration of the second
servlet extracted from the sitemap:

<map:match pattern="CheckoutPage.html">
 	<map:generate
		src="http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
	<map:transform src="style/CheckoutPage_html.xsl" type="xslt"/>
 	<map:serialize type="html"/>
</map:match>

It works fine (the servlet), but it cannot retrieve the "cart" from
the session.  Also I think it cannot retrieve the session.

The answer is:
"Must I do something special in the sitemap to pass the session to 
this servlet?"

Thanks a lot and ask me for anything you do not understand of my poor
explanation.

-- Mauro



On Fri, 29 Nov 2002, "Kazmír, Jaroslav" wrote:

> I don't know, how it's with the servlets, but I use for the session this:
> 
> private Session session;
> ...
> session = request.getSession();
> session.setAttribute("cart", "true");
> 
> But I don't understand, where you would like to check this session in your
> next step. I check my session in another java class or in XSP file.
> 
> JayKay
> 
> -----Original Message-----
> From: Mauro Daniel Ardolino [mailto:mauro@altersoft.com.ar] 
> Sent: Freitag, 29. November 2002 15:15
> To: cocoon-users@xml.apache.org
> Subject: Re: Sessions (read please!)
> 
> Hi! third time.  I'm still stuck.  May be the subject is not interesting,
> or may be no one is working with cocoon, servlets and session attributes.
> HELP! (read below).
> 
> Thanks, and sorry for insisting.
> 
> -- Mauro
> 
> On Fri, 22 Nov 2002, Mauro Daniel Ardolino wrote:
> 
> > Hi again!  I'm still stuck.  I've tried a lot of things without success.
> > Does anyone work with cocoon and servlets, and session attributes?
> > If so, please read below (my previous mail)! thanks!
> > 
> > -- Mauro
> > 
> > On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote:
> > 
> > > Hi! I have a problem using cocoon with other servlets.
> > > I have a servlet that outputs a xml and then in a pipeline I apply a xsl
> > > transformation.  This works well, but this servlet needs a session
> > > parameter.
> > > 
> > > Inside the servlet I wrote:
> > > 
> > > HttpSession session= request.getSession();
> > > TreeMap cart= (TreeMap) session.getAttribute("cart")
> > > 
> > > But I cannot obtain the "cart" parameter.  If I put the "false"
> parameter
> > > to the request.getSession(), I obtain an exception.
> > > 
> > > So I have to think that cocoon is not passing the session to this
> servlet.
> > > I have to say that other servlet adds the "cart" parameter to the
> session,
> > > of course.
> > > 
> > > Here's a copy of the pipeline:
> > > 
> > > <map:match pattern="CheckoutPage.html">
> > > 	<map:generate
> src="http://delta:18080/ProductSelectionDemo1/checkoutPage"/> 
> > > 	<map:transform src="style/CheckoutPage_html.xsl" type="xslt"/>
> > > 	<map:serialize type="html"/>
> > > </map:match>
> > > 
> > > Must I do something special to pass the session to this servlet?
> > > (the servlet url is
> "http://delta:18080/ProductSelectionDemo1/checkoutPage")
> > > 
> > > Thanks in advance.
> > > 
> > > -- Mauro
> > > 
> > > 
> > 
> > 
> 
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: mauro@altersoft.com.ar
website: http://www.altersoft.com.ar



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message