url rewriting when the url contains parameters

G

Gaurav Agarwal

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
 
D

Dag Sunde

Gaurav Agarwal said:
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" ?

;-)
 
G

Gaurav Agarwal

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top