David Wall wrote:
>
> What is the correct way to ensure that FORMs that are POSTed pass along the
> session id information when cookies are disabled?
>
> The response.encodeURL() works just when going from link to link, but it
> always seems to get lost when I post a form. This was not working in JRun
> 2.3.1 (JSP 0.92), but it also doesn't seem to be working in JRun 2.3.3 (JSP
> 1.0).
>
> I tried putting the encodeURL() call into the form's "action" URL, but that
> doesn't seem to help at all.
This is because JRun doesn't use the (as per the Servlet 2.2 spec) standard
way to encode the session ID in the URL. They use a regular query string
parameter for the session ID, and if you have a query string in the action
URL in a form using the GET method, it's ignored by most browsers (it seems
to work better with the POST method though). The way the session ID should
be encoded is as a "path parameter", i.e. something like this:
http://somehost/foo/bar;JSESSIONID=1234
This way it doesn't interfere with the form parameters. I have reported this
as a bug for JRun 3.0 Beta 5, but I'm not sure if it's been fixed yet.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets