Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 86599 invoked from network); 18 Jun 2004 11:45:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Jun 2004 11:45:21 -0000 Received: (qmail 54746 invoked by uid 500); 18 Jun 2004 11:44:59 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 54649 invoked by uid 500); 18 Jun 2004 11:44:58 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 54623 invoked by uid 99); 18 Jun 2004 11:44:58 -0000 Received: from [66.218.94.63] (HELO web90005.mail.scd.yahoo.com) (66.218.94.63) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 18 Jun 2004 04:44:58 -0700 Message-ID: <20040618114436.45073.qmail@web90005.mail.scd.yahoo.com> Received: from [202.54.194.113] by web90005.mail.scd.yahoo.com via HTTP; Fri, 18 Jun 2004 04:44:36 PDT Date: Fri, 18 Jun 2004 04:44:36 -0700 (PDT) From: Dhruv Trivedi Subject: Re: problem with jsession id To: Struts Users Mailing List In-Reply-To: <01ec01c45526$1d44e8b0$2fbf430a@tmn.capgemini.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-907869458-1087559076=:41688" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-907869458-1087559076=:41688 Content-Type: text/plain; charset=us-ascii Hi Niko and all other guys, is there any way in struts to avoid this URL rewriting. Actually jsessionid is also appended with the link with which i am submitting the form. have a look on code: Original code is: Login But when i run application(first time): Login How can i get rid of this thing --Dhruv Nicolas De Loof wrote: 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 > > > 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: "recipient@capgemini.com". 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: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! --0-907869458-1087559076=:41688--