httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Salazar <>
Subject Re: [users@httpd] mod_rewrite + ProxyPassReverse -> JSESSIONID LOST?? (UPDATED)
Date Tue, 14 Oct 2003 11:36:55 GMT
On Tue, 2003-10-14 at 11:08, Pedro Salazar wrote:
> I believe that mod_proxy/mod_rewrite is loosing the jsessionid.
> I have an application that stores a session variable X on a jsp, and
> then redirect to another jsp. In the other jsp, the session variable X
> does not exist. Probably that happens because jsessionid may be lost on
> mod_proxy/mod_rewrite... So any user session variable is lost!!
> remember my rules:
> ProxyPassReverse /tst/ngincard_06/
> RewriteRule ^/tst/ngincard_06/(.*)
> http://%{SERVER_NAME}:9080/ngincard_06/$1 [L,P]

I have more information to update here.

a)- Using apache as proxy, the sessionid is not preserved;
b)- Using tomcat directly, the sessionid is preserved.

- In my JSP page, I redirect to a second JSP "redirect.jsp". If I print
what should be my redirected URL for redirect.jsp, in case a) it prints
only "redirect.jsp" but in case b) it prints

Why it prints jsessionid as a parameter in case a) and in other one it
doesn't prints nothing?

Well, I figure that if in the working case b) does not prints anything,
the session id must be passed to client by another way... A find that a
header in the response as a cookie could be a way...

So, I added a header "set-cookie" with the value "JSESSIONID=XXXX" in
the application. And now it works fine!!!

1- why sometimes it uses a query string parameter "jsessionid" on the
redirected URL and another times it uses a cookie header? What is the
right way?

2- If the jsessionid is passed by a query string parameter, shouldn't
the mod_proxy be able to work with that also?

Pedro Salazar.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message