-
1. Re: Pass session id in url
raist_majere Apr 23, 2007 5:07 PM (in response to a_titov82)Take a look in the dtd file jboss-web-4_0.dtd in the docs/dtd dir, and look for "use-session-cookies".
-
2. Re: Pass session id in url
a_titov82 Apr 24, 2007 3:20 AM (in response to a_titov82)Thank you for answer... But it does not work as expected. Session id is not added to url. Here is my jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>client1</context-root> <use-session-cookies>false</use-session-cookies> </jboss-web>
And here is source code of html output:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title></title> </head> <body> <form name="myform" method="post" action="/client1/myaction.do"> <center> messsage <input type="text" name="number" value=""> </center> </form> </body> </html>
There is no jsessionid after /client1/myaction.do... -
3. Re: Pass session id in url
raist_majere Apr 24, 2007 5:41 AM (in response to a_titov82)Are you using the response method "encodeURL" to put the id in the url written in the page http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String) or using any tag library to do so? Or you just write down the URL?
-
4. Re: Pass session id in url
a_titov82 Apr 24, 2007 2:44 PM (in response to a_titov82)I use struts and it's tags <html:form>, <html:link> and so on. jsessionid appears always when I disable cookies in browser. When cookies are enabled jessionid appears only on first page.
-
5. Re: Pass session id in url
raist_majere Apr 24, 2007 6:49 PM (in response to a_titov82)You should post the Jboss version you're using, 'cause they differ in behaviour between versions...
But maybe you can took a look at this other post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=57341 (which I get surprised I am one of the repliers and I didn't remembered about it... :-)) and try doing Scott Stark's solution. Tell us if it works and what version are you using. -
6. Re: Pass session id in url
raist_majere Apr 24, 2007 7:03 PM (in response to a_titov82)Just another thing if you try using context.xml is that Tomcat requires it a META-INF subfolder of the web app, but I think JBoss needs it in WEB-INF. If one doesn't work try the other :-P
-
7. Re: Pass session id in url
raist_majere Apr 24, 2007 7:14 PM (in response to a_titov82)I've seen something else that could be your problem... In your jboss-web.xml it appears no doctype element before the jboss-web tag, so maybe is using jboss-web.dtd, which is an old one and doesn't have the use-session-cookies... Try putting the right version for your JBoss version before doing the other things I've told you to try...
-
8. Re: Pass session id in url
a_titov82 Apr 25, 2007 3:11 PM (in response to a_titov82)Looks like it works! I created context.xml and putted it into META-INF and WEB-INF.
context.xml contains:<Context path="<context path>" cookies="false" override="true" />
Thank you for answer.