Take a look in the dtd file jboss-web-4_0.dtd in the docs/dtd dir, and look for "use-session-cookies".
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...
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?
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.
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.
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
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...
Looks like it works! I created context.xml and putted it into META-INF and WEB-INF.
<Context path="<context path>" cookies="false" override="true" />
Thank you for answer.