You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Markus Meissner <ma...@meissner.IT> on 2005/11/05 14:26:10 UTC
Loosing session using apache 1.3.26-0woody6, mod_jk and tomcat 5.5.9
Hi,
I have the problem that the session-id response.encodeURL adds seems not to
be vaild as on every retry I get a new session-id. That occurres only if I
set up the Context with cookies="false" using mod_jk and apache before
tomcat.
Details:
Using tomcat 5.5.9 over port 8080 behaves as expected: No ;jsessionid in the
URL using cookies, ;jsessionid added if Context->cookies="false". Using an
apache-server in front of tomcat with mod_jk (tested versions
"libapache-mod-jk 3.3a-4woody1" and "jakarta-tomcat-connectors-1.2.14.1",
compiled from source) works fine with cookies but does not work with cookies
(new ;jsessionid at every request).
/etc/apache/httpd.conf
JkWorkersFile /etc/tomcat5/workers.properties
In my virtual-host-block:
JkMount /* ajp13 (tested also with /*.jsp, /test)
/etc/tomcat5/workers.properties
# Tomcat and Java configuration
#
workers.tomcat_home=/usr/local/share/tomcat5
workers.java_home=/usr/local/lib/java/1.5
ps=/
worker.list=ajp13
# Definition for local worker using AJP 1.3
#
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
Test-script session.jsp
<%
Integer i= (Integer)session.getAttribute("i");
if (i==null)
i = new Integer(0);
i = new Integer(i.intValue()+1);
session.setAttribute("i", i);
%>
i=<%=session.getAttribute("i")%><br/>
sid=<%=session.getId()%><br/>
<a href="<%=response.encodeURL("session.jsp")%>">Next</a><br/>
It would be great if someone can provide a hint!
--
Beste Grüße / best regards Markus Meissner
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org