You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by reza x <re...@yahoo.com> on 2004/02/19 09:21:50 UTC

my sessoin vanished?!

hi all.
I had to pass some request parameters to my generator servlet. below is the sitemap snippest related to this. I want my generator to use the SOURCE servlet to get the input xml.in SOURCE servlet I make Query and regarding to it , return the OUT containing data.
but i can't send the table name to SOURCE servlet.because the session vanishes?!
 
//this code is in Cocoon servlet
        table=req.getParameter("table");
        req.getSession().setAttribute("table",table);
/////////////////////////////////////////////////////////////////////
 
//this code is in SOURCE servlet

table=request.getSession().getAttribute("table");
/////////////////////////////////////////////////////////////////////

 
            <map:match pattern="report.html">
                <map:generate src="http://localhost:8083/web/SOURCE"/>
                <map:transform src="format/style/xsl/page2html.xsl"/>
                <map:serialize type="html"/>
            </map:match>
 
in SOURCE servlet my table becomes null
 
thanks alot for your attention.
Best Regards.


---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.

Re: my sessoin vanished?!

Posted by Jan Hoskens <jh...@schaubroeck.be>.
You're generating with an uri 'http://', so this is a http request to your source servlet. Is your source a totally different servlet? Or is it running in the same cocoon? If in the same cocoon, you won't need the http, if totally different servlet, I don't know how and why you're wanting to share the session, just pass it as a request parameter with the inputmodules eg. src="...?{session-attr:table}"

Greetz,
Jan

  ----- Original Message ----- 
  From: reza x 
  To: users@cocoon.apache.org 
  Sent: Thursday, February 19, 2004 9:21 AM
  Subject: my sessoin vanished?!


  hi all.
  I had to pass some request parameters to my generator servlet. below is the sitemap snippest related to this. I want my generator to use the SOURCE servlet to get the input xml.in SOURCE servlet I make Query and regarding to it , return the OUT containing data.
  but i can't send the table name to SOURCE servlet.because the session vanishes?!

  //this code is in Cocoon servlet
          table=req.getParameter("table");
          req.getSession().setAttribute("table",table);
  /////////////////////////////////////////////////////////////////////

  //this code is in SOURCE servlet
  table=request.getSession().getAttribute("table");
  /////////////////////////////////////////////////////////////////////

              <map:match pattern="report.html">
                  <map:generate src="http://localhost:8083/web/SOURCE"/>
                  <map:transform src="format/style/xsl/page2html.xsl"/>
                  <map:serialize type="html"/>
              </map:match>

  in SOURCE servlet my table becomes null

  thanks alot for your attention.
  Best Regards.


------------------------------------------------------------------------------
  Do you Yahoo!?
  Yahoo! Mail SpamGuard - Read only the mail you want.