url rewriting when the url contains parameters

Discussion in 'Java' started by Gaurav Agarwal, Jan 31, 2005.

  1. 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
     
    Gaurav Agarwal, Jan 31, 2005
    #1
    1. Advertising

  2. Gaurav  Agarwal

    Dag Sunde Guest

    "Gaurav Agarwal" <> wrote in message
    news:...
    > 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.
     
    Dag Sunde, Jan 31, 2005
    #2
    1. Advertising

  3. 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.
     
    Gaurav Agarwal, Jan 31, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Dyer
    Replies:
    5
    Views:
    648
  2. Juha Borenius

    URL rewriting

    Juha Borenius, Aug 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    465
    Colin Young
    Aug 15, 2003
  3. Thedotnetteer
    Replies:
    2
    Views:
    787
    Thedotnetteer
    Nov 27, 2003
  4. Jon paugh
    Replies:
    1
    Views:
    753
  5. =?Utf-8?B?cmFwaWRkYXRh?=

    url rewriting with no extension in url

    =?Utf-8?B?cmFwaWRkYXRh?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    405
    Flinky Wisty Pomm
    Nov 2, 2006
Loading...

Share This Page