On first request, a session is created. Tomcat (or any other servlet container) wan use two mecanism to handle sessions : cookies or URL rewriting (add a ";jsessionid=...").
Preference is for cookies, because it doesn't need to change URLs in pages, but on first request, Tomcat has no way to know if the browser accepts cookies, so it needs to rewrite URLs AND put a setCookie header. If next request have cookie, URL rewriting is not mandatory anymore. URL rewriting is done when encoding URL using response.encodeUrl(). Struts is compliant with J2EE and calls this method in jsp tags for every URL it has to render. If you don't want such URL to be shown in user browser, you should use a redirect on your first action. Nico. > hello guys, > > when i open the login form of my struts application, for the very first time a > jession id is appended with the value of action attribute > > example > > <html:form action="admin.login.do;jsessionid=1101010654575" > > above value is shown in the source code of the displayed page. > > can any one tell me why it happens and how can i solve this problem. > > Asim Ghosh > > > > --------------------------------- > ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself Our name has changed. Please update your address book to the following format: "[EMAIL PROTECTED]". This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]