Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Apache+Tomcat+mod_jk+cookie+Rewrite

DEVAL SHAH

2007-01-05

Replies:

Hello,
I notice that because of url rewriting [RewriteRule] my cookie is not being
passed to Tomcat. This is what I am doing:
I have mod_jk as connector between Tomcat and Apache.
I have an HTML page where I set my cookie - username.
Now If I call the servlet directly from html page then cookie gets passed
e.g. /MyApp/MyServlet it works well.
But I have added a redirection as follows:

RewriteRule ^/url1$ /MyApp/MyServlet   [PT]

MyApp is a web application in Tomcat.
Now in my HTML page in the onSubmit function I call /url1 instead of servlet
directly - this redirects to the servlet but the cookie is not set.

How do i go about passing the cookie to the servlet using RewriteRule ?

Thank you in advance
Deval



---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.