tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Radzom" <srad...@web.de>
Subject RE: sessionids through url rewriting
Date Tue, 29 Jul 2003 20:10:54 GMT
You don't have to implement that yourself. Just pass every url through
HttpServletResponse.encodeURL(url).

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/servletapi/javax/servlet/htt
p/HttpServletResponse.html#encodeURL(java.lang.String)

-Stefan


> -----Original Message-----
> From: Hans Wichman [mailto:hans@trimm.nl] 
> Sent: Tuesday, July 29, 2003 10:06 PM
> To: Tomcat Users List
> Subject: RE: sessionids through url rewriting
> 
> 
> I was afraid you were going to say that ;-(. Guess I will built in a 
> cookiecheck then...
> At 01:29 PM 7/29/2003 -0600, you wrote:
> 
> >Since you are passing your session id through URL, the url 
> string must contain
> >the jsessionid parameter, i.e., you have to encode it.
> >
> >
> >-----Original Message-----
> >From: Hans Wichman [mailto:hans@trimm.nl]
> >Sent: July 29, 2003 11:51 AM
> >To: tomcat-user@jakarta.apache.org
> >Subject: sessionids through url rewriting
> >
> >
> >Hi,
> >I've read in the servlets specs that tomcat must support 
> session management
> >through url rewriting, but nothing happens when I disable the cookies
> >(testing in netscape 7, since ie 6 sp1 can't disable the cookies).
> >
> >I have one servlet, let's call it /myServlet, which 
> implements a command
> >like pattern wrapping a result generating application, for 
> example I call
> >the servlet with
> >1)
> >localhost:8080/myServlet?command0=load&argument0=&command1=in
> it&argument=1&queue
> >length=2
> >
> >The servlet parses the command and arguments into command objects and
> >passes them onto an instance of an application which is 
> stored in each
> >users session (each user has his own instance of the 
> application), the
> >application processes the request using templates blablahblah and the
> >servlet gets all the generated content using getResult() 
> dumping it into
> >the output stream of the servlet.
> >
> >Where in this process should the automatic url rewriting 
> occur? I haven't
> >got a clue....
> >Does my own request (see 1) overwrite any jsessionid that should
> >automatically be added ? Is url rewriting only supported 
> directly from
> >hyperlinks in a jsp page?
> >
> >Hope anyone can help, I'm using apache tomcat/4.1.24 (and 
> not 4.1.23 ;-))
> >
> >Hans
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message