There is no need for you to use a taglib to render a link! The easiest
solution:

<a href="javascript:login();" class="button">Login</a>

> -----Original Message-----
> From: Dhruv Trivedi [mailto:[EMAIL PROTECTED]
> Sent: 18 June 2004 12: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:
> <html:link href="javascript:login()" styleClass="button">Login</html:link>
>
> But when i run application(first time):
> <html:link href="javascript:login();jsessionid;7568975745"
> styleClass="button">Login</html:link>
>
> How can i get rid of this thing
>
> --Dhruv
>
>
>
>
> Nicolas De Loof <[EMAIL PROTECTED]> 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: "[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]
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to