Hello, This ALMOST seems to work. I can't tell if I'm having a problem with Apache, or it's a problem with Tomcat.
## It works for a URL like: #http://www.myserver.com/%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2 # ## But, it doesn't seem to work for a URL like: #http://www.myserver.com/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2 # The addition of the "login/index.jsp" results in the following error: HTTP Status 404 - /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2 ------------------------------------------------------------------------------ type Status report message /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2 description The requested resource (/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2) is not available. -------------------------------------------------------------------------------- Apache Tomcat/4.1.12 It looks like the %3b was translated for (or by?) Tomcat when there was no speific page given. Any ideas? Thanks, Raiden On Mon, 2 Dec 2002, Bill Barker wrote: > Try encoding the ';' as follows: > > <% > String refresh = > response.encodeURL("https://www.myserver.com/login/index.jsp"); > int jssid = refresh.indexOf(";jsessionid"); > if(jssid > 0) { > refresh = refesh.substring(0, jssid) + "%3b" + > refresh.substring(jssid+1); > } > %> > <META http-equiv="refresh" CONTENT="0; URL=<%= refresh %>"> > > "Raiden" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello, > > > > As is seen by searching the list archive, this problem has come up quite a > > bit, but there doesn't seem to be an agreed upon solution. > > > > The problem occurs in the following html code: > > > > <meta http-equiv="Refresh" > > > content="0;URL=https://www.myserver.com/login/index.jsp;jsessionid=3E9F55499 > DCAE154870AD0FAE5B30C20?source=test"> > > > > The ;jsessionid is ignored by the browser. So, it appears that you cannot > > maintain session through URL rewriting (cookies are off), if you use a > > meta refresh. > > > > One solution that I've seen is to replace the ; with a ?, so the browser > > will accept and process the entire URL... and then intercept the browser's > > request before it gets back to the tomcat instance, and change the ? back > > to a ; (since I'm using Apache... I'd use mod_rewrite) > > > > Are there any problems with this solution? Would a browser ever reject it > > for having two ? 's? (one for the ;jsessionid and one for the normal > > query string) > > > > This seems like a pretty rough solution. Does anyone have any better > > ideas? > > > > Thanks, > > Raiden > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
