You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert Hailey <rh...@allogy.com> on 2013/10/05 20:05:24 UTC

[T5.3] Completely Disabling Tapestry Sessions

Greetings, all!

I've nearly completed a really small service, and (as far as I know and have written) it does not use session persistence in any way.

Contrawise, I notice in testing that the JSESSIONID cookie is *still* being sent to the browser under normal operations.

Is there some way (outside of the containers configuration) that I can disable sessions altogether?

I notice, for example, that there is a ClusteredSessionImpl... can I easily swap-in a NullSessionImpl ???

Thanks in advance!

--
Robert Hailey


Re: [T5.3] Completely Disabling Tapestry Sessions

Posted by Barry Books <tr...@gmail.com>.
The jsessionid is handled by the servlet container. There are various was
to disable it. Here are some suggestions for tomcat.

http://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet

The tricker part is some Tapestry components such as Grid need to persist
data and by default will use the session. You can either not use those
components or write you own persist handler that does not use the session.


On Sun, Oct 6, 2013 at 3:34 AM, Lenny Primak <lp...@hope.nyc.ny.us> wrote:

> You should not need to do anything in Tapestry to disable sessions.
> If you are not using them, they should not be created.  I have confirmed
> this in my own app.
>
> On Oct 5, 2013, at 2:05 PM, Robert Hailey wrote:
>
> >
> > Greetings, all!
> >
> > I've nearly completed a really small service, and (as far as I know and
> have written) it does not use session persistence in any way.
> >
> > Contrawise, I notice in testing that the JSESSIONID cookie is *still*
> being sent to the browser under normal operations.
> >
> > Is there some way (outside of the containers configuration) that I can
> disable sessions altogether?
> >
> > I notice, for example, that there is a ClusteredSessionImpl... can I
> easily swap-in a NullSessionImpl ???
> >
> > Thanks in advance!
> >
> > --
> > Robert Hailey
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5.3] Completely Disabling Tapestry Sessions

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
You should not need to do anything in Tapestry to disable sessions.
If you are not using them, they should not be created.  I have confirmed this in my own app.

On Oct 5, 2013, at 2:05 PM, Robert Hailey wrote:

> 
> Greetings, all!
> 
> I've nearly completed a really small service, and (as far as I know and have written) it does not use session persistence in any way.
> 
> Contrawise, I notice in testing that the JSESSIONID cookie is *still* being sent to the browser under normal operations.
> 
> Is there some way (outside of the containers configuration) that I can disable sessions altogether?
> 
> I notice, for example, that there is a ClusteredSessionImpl... can I easily swap-in a NullSessionImpl ???
> 
> Thanks in advance!
> 
> --
> Robert Hailey
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3] Completely Disabling Tapestry Sessions

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
That's from Tapestry side. Maybe you should take a look at your servlet  
container documentation to know whether you can disable sessions there.

On Sat, 05 Oct 2013 15:30:50 -0300, Thiago H de Paula Figueiredo  
<th...@gmail.com> wrote:

> On Sat, 05 Oct 2013 15:05:24 -0300, Robert Hailey <rh...@allogy.com>  
> wrote:
>
>> Greetings, all!
>
> Hi!
>
>> I've nearly completed a really small service, and (as far as I know and  
>> have written) it does not use session persistence in any way.
>>
>> Contrawise, I notice in testing that the JSESSIONID cookie is *still*  
>> being sent to the browser under normal operations.
>>
>> Is there some way (outside of the containers configuration) that I can  
>> disable sessions altogether?
>
> I think you can override or decorate the TapestrySessionFactory service  
> so the getSession(boolean) method returns a Session implementation that  
> doesn't actually stores anything (your NullSessionImpl). This solution  
> is for 5.3 and later and I haven't tested it.
>


-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3] Completely Disabling Tapestry Sessions

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sat, 05 Oct 2013 15:05:24 -0300, Robert Hailey <rh...@allogy.com>  
wrote:

> Greetings, all!

Hi!

> I've nearly completed a really small service, and (as far as I know and  
> have written) it does not use session persistence in any way.
>
> Contrawise, I notice in testing that the JSESSIONID cookie is *still*  
> being sent to the browser under normal operations.
>
> Is there some way (outside of the containers configuration) that I can  
> disable sessions altogether?

I think you can override or decorate the TapestrySessionFactory service so  
the getSession(boolean) method returns a Session implementation that  
doesn't actually stores anything (your NullSessionImpl). This solution is  
for 5.3 and later and I haven't tested it.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org