From servlet engine point of view, jsessionid is not a query
parameter, you can verify that by calling getParameter or getParameterMap on request object, jsessionid is not there.
To my mind, the simplest thing one can do is to get rid of jsessionid parameter. To do this you need to have cookies enabled in the browser. When you make the first request it will be free of session id. On server check for session id cookie, if it is not in the request, perform a redirect to the same URL. From this point on session id will be passed as a cookie. Michael. On 3/5/07, Eric Rank <[EMAIL PROTECTED]> wrote:
Happy Monday everyone. I have a question for you. Hopefully it doesn't go too far off track. When I'm using the struts url tag (struts 2) to generate a link, I get a non standard url parameter, ";jsessionid" appended on the first visit with a new browser session. It seems that this occurs with a call to the HttpServletResponse.encodeURL method. I get a URL like this (note the semicolon): /context/namespace/page.action;jsessionid=xxxx instead of what I would hope for (question mark replaces the semicolon): /context/namespace/page.action?jsessionid=xxxx The real problem occurs when I attempt to serve the page through Apache httpd and mod_jk (running on a httpd / mod_jk / tomcat environment). I'm guessing that Apache httpd sees the request as a type of ".action;jsessionid=xxxxxxx" instead if a type ".action" and serves the resulting content (rendered correctly by tomcat) as plain text. The ".action" type has been added to the httpd.conf with the addType directive. All of the session stuff is handled normally with tomcat. The question: Ultimately, how can I get Apache httpd to display the content as "text/html" when I have a "jsessionid" appended to urls? Is there something I can configure with httpd.conf? Is there something I can configure with web.xml? Is there a way to make the call to the HttpServletResponse.encodeURL use a question mark instead of a semicolon? Thanks for your help! Eric Rank
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]