You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Merico Raffaele <ra...@less.ch> on 2004/07/21 12:53:31 UTC
map:generate -> servlet -> empty session problem
Hi
I'm using Cocoon 2.1.5.1 under Tomcat 4.0.4.
I have a servlet tixj.VE2000i does a login and starts a session.
When I try to invoke the servlet again to generate some XML data using the
following sitemap it always has an empty session.
<map:match pattern="**VersicherterSuchen.html">
<map:generate src="{request:concat(scheme, '://', serverName, ':',
serverPort, '/ve2000ic/servlet/tixj.VE2000i?', queryString)}"/>
<map:transform type="xslt"
src="xsl/xml2html/appl/VersicherterSuchen/VersicherterSuchen.xslt">
<map:parameter name="global.host" value="{request:concat(scheme, '://',
serverName, ':', serverPort)}"/>
<map:parameter name="global.contextPath" value="/ve2000ic/appl"/>
<map:parameter name="global.lang" value="de"/>
</map:transform>
<map:serialize type="xhtml"/>
</map:match>
For your support many thanks in advance ... Raffaele
Raffaele Merico
LESS Informatik AG
Böhnirainstrasse 14
CH-8800 Thalwil
Tel: +41 1 723 12 22
Dir: +41 1 723 92 45
Fax: +41 1 723 12 23
mailto:merico@less.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: map:generate -> servlet -> empty session problem
Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.07.2004 12:53, Merico Raffaele wrote:
> Hi
>
> I'm using Cocoon 2.1.5.1 under Tomcat 4.0.4.
> I have a servlet tixj.VE2000i does a login and starts a session.
> When I try to invoke the servlet again to generate some XML data using the
> following sitemap it always has an empty session.
>
> <map:match pattern="**VersicherterSuchen.html">
> <map:generate src="{request:concat(scheme, '://', serverName, ':',
> serverPort, '/ve2000ic/servlet/tixj.VE2000i?', queryString)}"/>
You should not access your servlet in that way is it starts a new
external request (over http again, and with a new request object, so
without session). The JSPGenerator (which is indeed a ServletGenerator
as Unico stated somewhere in the Javadocs IIRC) might be the solution
for you. You can of course also add the session info into the above URL
string, but that's not the perfect solution IMO.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org