url rewriting when the url contains parameters  
Author Message
Gaurav Agarwal





PostPosted: 2005-1-31 18:50:00 Top

java-programmer, url rewriting when the url contains parameters Hi,
I am trying to maintain sessions by doing URL rewrite. Things were
working fine till the URL did not contain any parameters. The URL that
I have now is of the form:

http://myurl?id=1&user=null and on doing a sessionID append it becomes

http://myurl?id=1&user=null;jsessionId=xyzw..

Things still get authenticated but now when I try and get the value of
user I get passed the whole string after user= and not just null.
What is the right way to append the sessionID? Btw, I am using the URL
to connect to a servlet from a j2me client.

Thanks,
Gaurav

 
Dag Sunde





PostPosted: 2005-1-31 18:58:00 Top

java-programmer >> url rewriting when the url contains parameters "Gaurav Agarwal" <email***@***.com> wrote in message
news:email***@***.com...
> Hi,
> I am trying to maintain sessions by doing URL rewrite. Things were
> working fine till the URL did not contain any parameters. The URL that
> I have now is of the form:
>
> http://myurl?id=1&user=null and on doing a sessionID append it becomes
>
> http://myurl?id=1&user=null;jsessionId=xyzw..
>
> Things still get authenticated but now when I try and get the value of
> user I get passed the whole string after user= and not just null.
> What is the right way to append the sessionID? Btw, I am using the URL
> to connect to a servlet from a j2me client.

Take a look at the original URL...
What symbol is used to separate "id=1" from "user=null" ?

Are you using the same symbol to separate "user=null"
from "jsessionId=xyzw" ?

;-)

--
Dag.



 
Gaurav Agarwal





PostPosted: 2005-1-31 19:15:00 Top

java-programmer >> url rewriting when the url contains parameters I tried this approach but it doesn't seem to work. I read somewhere
that HTTP Specification allows appending info (like session) after a
semi-colon.

However when I did the following:
http://myurl;jsessionId=xyz....?id=0&user=null then things went fine.

The problem with this is that the session id is known to the client and
the url is sent by the server.