Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 90311 invoked from network); 18 Jun 2004 11:52:37 -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:52:37 -0000 Received: (qmail 74838 invoked by uid 500); 18 Jun 2004 11:52:11 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 74781 invoked by uid 500); 18 Jun 2004 11:52:10 -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 74760 invoked by uid 99); 18 Jun 2004 11:52:09 -0000 Received: from [202.83.97.26] (HELO gridnode.com) (202.83.97.26) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 18 Jun 2004 04:52:09 -0700 Received: from andrew (pc209 [192.168.213.209]) by gridnode.com (8.12.9/8.12.4) with SMTP id i5IC9iGP009886 for ; Fri, 18 Jun 2004 20:09:44 +0800 Reply-To: From: "Andrew Hill" To: "Struts Users Mailing List" Subject: RE: problem with jsession id Date: Fri, 18 Jun 2004 19:45:49 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <20040618114436.45073.qmail@web90005.mail.scd.yahoo.com> Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Well for a start you should not use html:link for javascript links! (only for real links!) html:link's (primary) purpose is to ensure that the jsessionid is added to a href url if cookies are disabled (or on the first page). Obviously that functionality is hardly applicable for a javascript link where the href isnt a url. -----Original Message----- From: Dhruv Trivedi [mailto:dhruv_psc@yahoo.com] Sent: Friday, 18 June 2004 19:45 To: Struts Users Mailing List Subject: Re: problem with jsession id 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! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org