You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Giorgos Zervas <gi...@perlfect.com> on 2004/06/17 19:30:49 UTC

running stateless

Hi everyone,

I am in the process of optimizing my Tapestry app and as part of this I
am trying to make it stateless for the whenever possible.

However, I am having problems as Tapestry insists on create the
HttpSession always. In particular I have a page that implements
IExternalPage. It contains not persistent page properties and doesn't
create the visit object. It does contain a Form though which I have set
to stateless and it also contains the Tapestry inspector. Whenever I
start my app by visiting this page first and I click on the inspector
button I see that I have been assigned a session.

Why could this be happening? Is there something else I need to avoid
doing in order to keep my app stateless?

Perhaps I should also mention that since I am using Spring as well I
have subclasses the BaseEngine as per the Spring docs and placed the
Spring ApplicationContext in the Tapestry Global object. I am not sure
though whether this is related to my problems...

Kind regards,
Giorgos


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


RE: running stateless

Posted by Giorgos Zervas <gi...@perlfect.com>.
Thanks Howard, that's great. Even though I own "the book" I don't think
I was able to find it in there. Perhaps you should consider adding this
helpful trick in a second edition.

Giorgos

On Thu, 2004-06-17 at 22:10, Howard M. Lewis Ship wrote:
> I find it useful, when initially developing, to add something to my pages (usually via a common
> Border component):
> 
> <br>
> Stateful: <span jwcid="@Insert" value="ognl:page.engine.stateful"/>
> 
> You might even find this helpful:
> 
> <span jwcid="@Delegator" delegate="ognl:page.requestCycle.requestContent"/>
> 
> (you need to dress it up with some CSS to be readable, as in the Workbench).
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> 
> > -----Original Message-----
> > From: Giorgos Zervas [mailto:giorgos@perlfect.com] 
> > Sent: Thursday, June 17, 2004 2:01 PM
> > To: Tapestry users
> > Subject: Re: running stateless
> > 
> > 
> > On Thu, 2004-06-17 at 20:58, Norbert_Sándor wrote:
> > > Maybe the inspector makes it stateful.
> > > It's just a guess :))
> > 
> > I think you may be right since the actual cookie with the 
> > jsessionid is
> > sent when I click on the Tapestry inspector button and the 
> > new window is
> > opened.
> > 
> > Which leads me to the next logical question:
> > 
> > How can I test whether my pages are stateless?
> > 
> > Regards,
> > Giorgos
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> !DSPAM:40d1ecfa42768855062470!
> 


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


RE: running stateless

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
I find it useful, when initially developing, to add something to my pages (usually via a common
Border component):

<br>
Stateful: <span jwcid="@Insert" value="ognl:page.engine.stateful"/>

You might even find this helpful:

<span jwcid="@Delegator" delegate="ognl:page.requestCycle.requestContent"/>

(you need to dress it up with some CSS to be readable, as in the Workbench).


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: Giorgos Zervas [mailto:giorgos@perlfect.com] 
> Sent: Thursday, June 17, 2004 2:01 PM
> To: Tapestry users
> Subject: Re: running stateless
> 
> 
> On Thu, 2004-06-17 at 20:58, Norbert_Sándor wrote:
> > Maybe the inspector makes it stateful.
> > It's just a guess :))
> 
> I think you may be right since the actual cookie with the 
> jsessionid is
> sent when I click on the Tapestry inspector button and the 
> new window is
> opened.
> 
> Which leads me to the next logical question:
> 
> How can I test whether my pages are stateless?
> 
> Regards,
> Giorgos
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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


Re: running stateless

Posted by Giorgos Zervas <gi...@perlfect.com>.
On Thu, 2004-06-17 at 20:58, Norbert_Sándor wrote:
> Maybe the inspector makes it stateful.
> It's just a guess :))

I think you may be right since the actual cookie with the jsessionid is
sent when I click on the Tapestry inspector button and the new window is
opened.

Which leads me to the next logical question:

How can I test whether my pages are stateless?

Regards,
Giorgos


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


Re: running stateless

Posted by Norbert Sándor <pr...@hotmail.com>.
Maybe the inspector makes it stateful.
It's just a guess :))

N.

----- Original Message ----- 
From: "Giorgos Zervas" <gi...@perlfect.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, June 17, 2004 7:50 PM
Subject: Re: running stateless


> As a continuation to my previous mail I did a simple test. I replaced
> the Home page of my application with a simple page that only contains
> the Tapestry inspector button. When I start the app by visiting this
> page and click on inspector button I find out that the HttpSession has
> been created. Shouldn't it be case that my app is stateless at this
> point in time?
> 
> I am definitely missing something (and I would really like to find it :)
> )
> 
> Regards,
> Girogos
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 

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


Re: running stateless

Posted by Giorgos Zervas <gi...@perlfect.com>.
As a continuation to my previous mail I did a simple test. I replaced
the Home page of my application with a simple page that only contains
the Tapestry inspector button. When I start the app by visiting this
page and click on inspector button I find out that the HttpSession has
been created. Shouldn't it be case that my app is stateless at this
point in time?

I am definitely missing something (and I would really like to find it :)
)

Regards,
Girogos


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