You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sunil virmani <su...@gmail.com> on 2006/09/07 09:55:54 UTC

removing jsessionid from the URL

Hi ,

I want to remove the jsessionid attached with URL . Can you please tell me
how can i confiure the same. Presently i am using apache tomcat server , can
you please tell me is there any way to configure the same.


Regards,
Sunil Virmani

Re: removing jsessionid from the URL

Posted by sunil virmani <su...@gmail.com>.
Hi All,

In my application in each request jsessionid is passed both in cookie as
well as in url. I have enabled the cookie then why it is appearing in the
URL also.


Regards,
Sunil

On 9/7/06, Antonio Petrelli <br...@tariffenet.it> wrote:
>
> sunil virmani ha scritto:
> > But Is there any way to hide the jsession id attribute?
>
> If you don't mind if the first page has the jsessionid attribute, you
> have simply to enable cookies in your browser.
>
> > It is my client  requirement or i have to handle the session
> > management using cookie.
>
> What do you mean?
>
> > Can you provide me the link for the session mangament in struts using
> > cookie?
>
> It's everything automatic! When you call "request.getSession()", the id
> of the session is decided either using jsessionid attribute in the URL,
> or using the cookie value.
> Anyway it's not specific to Struts, it's in all Java EE applications.
> The only thing Struts-related is URL-rewriting in several Struts tags.
>
> HTH
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: removing jsessionid from the URL

Posted by Antonio Petrelli <br...@tariffenet.it>.
sunil virmani ha scritto:
> But Is there any way to hide the jsession id attribute?

If you don't mind if the first page has the jsessionid attribute, you 
have simply to enable cookies in your browser.

> It is my client  requirement or i have to handle the session 
> management using cookie.

What do you mean?

> Can you provide me the link for the session mangament in struts using 
> cookie?

It's everything automatic! When you call "request.getSession()", the id 
of the session is decided either using jsessionid attribute in the URL, 
or using the cookie value.
Anyway it's not specific to Struts, it's in all Java EE applications. 
The only thing Struts-related is URL-rewriting in several Struts tags.

HTH
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: removing jsessionid from the URL

Posted by sunil virmani <su...@gmail.com>.
Hi Antonio,

Thanks for your quick reply. I agree with you if cookies are disabled then
URL rewriting will be used.

But Is there any way to hide the jsession id attribute? It is my client
requirement or i have to handle the session management using cookie. Can you
provide me the link for the session mangament in struts using cookie?


Regards,
Sunil Virmani






On 9/7/06, sunil virmani <su...@gmail.com> wrote:
>
> Hi Antonio,
>
> Thanks for your quick reply. I agree with you if cookies are disabled then
> URL rewriting will be used.
>
> 1. Is there any way to hide the jsession id attribute.
>
>
>
> Regards,
> Sunil Virmani
>
> On 9/7/06, Antonio Petrelli <brenmcguire@tariffenet.it > wrote:
> >
> > sunil virmani ha scritto:
> > > I want to remove the jsessionid attached with URL . Can you please
> > > tell me
> > > how can i confiure the same. Presently i am using apache tomcat server
> > > , can
> > > you please tell me is there any way to configure the same.
> >
> > The "jsessionid" attribute is put when cookies are not enabled on the
> > browser, or when there wasn't time to set one. For example if your home
> > JSP page has a <html:link>, the Struts tag will rewrite the URL
> > appending the "jsessionid" attribute, because it did not find any
> > cookie.
> > But why do you want to remove that attribute?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: removing jsessionid from the URL

Posted by sunil virmani <su...@gmail.com>.
Hi Antonio,

Thanks for your quick reply. I agree with you if cookies are disabled then
URL rewriting will be used.

1. Is there any way to hide the jsession id attribute.



Regards,
Sunil Virmani

On 9/7/06, Antonio Petrelli <br...@tariffenet.it> wrote:
>
> sunil virmani ha scritto:
> > I want to remove the jsessionid attached with URL . Can you please
> > tell me
> > how can i confiure the same. Presently i am using apache tomcat server
> > , can
> > you please tell me is there any way to configure the same.
>
> The "jsessionid" attribute is put when cookies are not enabled on the
> browser, or when there wasn't time to set one. For example if your home
> JSP page has a <html:link>, the Struts tag will rewrite the URL
> appending the "jsessionid" attribute, because it did not find any cookie.
> But why do you want to remove that attribute?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: removing jsessionid from the URL

Posted by Jorge Martín Cuervo <jo...@defactops.com>.
Hi all, 

can i change the jsessionid name? is it mandatory to use jsessionid name
to store the id?

thanks to all.

El jue, 07 de 09 de 2006 a las 10:24, Antonio Petrelli escribió:

> sunil virmani ha scritto:
> > I want to remove the jsessionid attached with URL . Can you please 
> > tell me
> > how can i confiure the same. Presently i am using apache tomcat server 
> > , can
> > you please tell me is there any way to configure the same.
> 
> The "jsessionid" attribute is put when cookies are not enabled on the 
> browser, or when there wasn't time to set one. For example if your home 
> JSP page has a <html:link>, the Struts tag will rewrite the URL 
> appending the "jsessionid" attribute, because it did not find any cookie.
> But why do you want to remove that attribute?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

-- 
;-)
____________________________________
Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email <jo...@defactops.com>
voz +34 985 129 820
voz +34 660 026 384
____________________________________

Re: removing jsessionid from the URL

Posted by Antonio Petrelli <br...@tariffenet.it>.
sunil virmani ha scritto:
> I want to remove the jsessionid attached with URL . Can you please 
> tell me
> how can i confiure the same. Presently i am using apache tomcat server 
> , can
> you please tell me is there any way to configure the same.

The "jsessionid" attribute is put when cookies are not enabled on the 
browser, or when there wasn't time to set one. For example if your home 
JSP page has a <html:link>, the Struts tag will rewrite the URL 
appending the "jsessionid" attribute, because it did not find any cookie.
But why do you want to remove that attribute?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org