> From: Franosch, Heike [mailto:[EMAIL PROTECTED]]
> 
> > :)
> > Of course your servlet won't see session of the client, you
> > invoke this
> > servlet from the server, not from the browser.
> >
> > You must pass jsessionid request parameter manually to this servlet.
I
> > hope you already did this and have jsessionid in the
> > {requestQuery}. If
> > not, add it.
> 
> Mhh, sorry to ask, but how is it done?
> I thought it would be something simply like:
>  <map:generate
>
src="http://localhost:8080/cocoon/servlet/testpackage.{../2};jsessionid=
{ses
> sion-id}{requestQuery}"/>
> 
> But at this time the {session-id} ist not set.
> Do I have to write some code to perform this?

Yes. Below.


> Thanks, Heike
> 
> ---
> Here again my whole environment:
> <!-- test servlet -->
>  <map:pipelines>
>   <map:pipeline>
>    <map:match pattern="testpackage/*/*">

Assuming that the action "request" returns you {session-id} parameter,
you can write very simple action ("request.getSession(true); return
EMPTY_MAP;") and invoke it here like this:

<map:act type="my-create-session-action"/>


>    <map:act type="request">

And here you will have {session-id} of newly created session (I assume
action "request" returns this variable).

Vadim

>      <map:parameter name="parameters" value="true"/>
> 
>    <map:generate
>
src="http://localhost:8080/cocoon/servlet/testpackage.{../2};jsessionid=
{ses
> sion-id}{requestQuery}"/>
> 
>    <map:transform type="xslt" src="testpackage/{../1}/{../2}.xsl">
> 
>        <map:parameter name="use-session-info" value="true"/>
>        <map:parameter name="session-id" value="{session-id}"/>
>        <map:parameter name="session-is-new" value="{session-is-new}"/>
>        <map:parameter name="session-available"
> value="{session-available}"/>
>        <map:parameter name="no" value="{no}"/>
>    </map:transform>
>    </map:act>
>    <map:serialize type="html">
>      <encoding>ISO-8859-1</encoding>
>    </map:serialize>
>  </map:match>
> 
>   </map:pipeline>
>  </map:pipelines>


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to