url rewriting/cookies


Web tier: servlets, JSP, Web frameworks: url rewriting/cookies

  1. url rewriting/cookies (3 messages)

    some browsers support cookies
    some may not
    some browsers only support url rewriting, others not
    how do you know a browser support cookies or url rewriting
    to write code that supports both
    any code is appritiated

    Threaded Messages (3)

  2. url rewriting/cookies[ Go to top ]

    hi preethi,

    browsers either support cookies or they do not support cookies. theres no question of "whether browsers support URL re-writing".

    URL re-writing is a feature that is provided by web servers/servlet engines/application servers.

    so in effect ur question that browsers support URL re-writing or not is incorrect.

    if u enable URL re-writing at the your server level then ur HTTP session would work even if the browser fails to support cookies. so its a great solution where u dont have cookies support from the browser. but ofcourse URL re-writing has its overhead i.e its a bit slow.

    about code your java server documentation shud have code examples. u dont have to do much.

    hope this helps

  3. url rewriting/cookies[ Go to top ]


    This is a tricky thing to find out whether the browser supports cookies or not at the server side.

    What you can do is first set a dummy cookie with some name and redirect the request using response.sendRedirect("cookieDetecter.jsp") . In cookieDetecter.jsp, try to read the cookie that you set. If you are able to read that then that means that cookies are enabled else cookies are disabled in the browser.

    If can add additional code to the cookieDetecter.jsp to colloborate with other JSPs depending on the need.

    Ravi Sankar Pabbati
    GE India
  4. url rewriting/cookies[ Go to top ]

      even if ur browser doesn't support cookies, it has to support urlrewriting.there's no other way. bcos, its a way to have dynamic queries/pages. so anybrowser would support this method.