You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mon Cab <fu...@yahoo.com> on 2005/11/18 07:03:39 UTC

Action.execute() only being invoked the first time a url is requested ??!!!

For Example if I type in my browser address bar:

http://127.0.0.1:8080/webapp/userSignup.do?action=whatever

The first time, I type this in, this invokes the
execute method of my Action class (I'm using
System.out ("Action execute Invoked") in Action
execute to test this).  If I then enter the exact same
url, this method is not getting called.  

I am not using validator at all!!  

Can anyone explain what is going on with this?



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Re: Action.execute() only being invoked the first time a url is requested ??!!!

Posted by Michael Jouravlev <jm...@gmail.com>.
On 11/18/05, Mon Cab <fu...@yahoo.com> wrote:
> Thanks Atta.  It is reloading the pages now.
>
> PS.  Is this default behaviour for STRUTS?  And if so,
> do you know why?  It seems to me that the default
> should should be not to cache pages with dynamic
> content.
>
> Is there a way to configure this in Tomcat or in the
> struts config?

struts-config.xml: <controller nocache="true"/>

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


Re: Action.execute() only being invoked the first time a url is requested ??!!!

Posted by Mon Cab <fu...@yahoo.com>.
Thanks Atta.  It is reloading the pages now.  

PS.  Is this default behaviour for STRUTS?  And if so,
do you know why?  It seems to me that the default
should should be not to cache pages with dynamic
content.  

Is there a way to configure this in Tomcat or in the
struts config?



--- atta-ur rehman <at...@gmail.com> wrote:

> Hi,
> 
> Most probably your page is gettnig cached by the
> browser. try
> 
> <head>
> <META content=0 http-equiv=expires>
> <META content=no-cache http-equiv=Pragma>
> <META content=no-cache http-equiv=Cache-Control>
> <META content=no-store http-equiv=Cache-Control>
> </head>
> 
> or
> 
> <%
> response.setHeader("pragma", "no-cache");
> response.setHeader("Cache-Control", "no-cache");
> response.setHeader("Cache-Control", "no-store");
> response.setDateHeader("Expires", 0);
> %>
> 
> to keep your browser from caching the page and see
> if it works.
> 
> HTH.
> 
> ATTA
> 
> On 11/17/05, Mon Cab <fu...@yahoo.com> wrote:
> >
> >
> > For Example if I type in my browser address bar:
> >
> >
>
http://127.0.0.1:8080/webapp/userSignup.do?action=whatever
> >
> > The first time, I type this in, this invokes the
> > execute method of my Action class (I'm using
> > System.out ("Action execute Invoked") in Action
> > execute to test this). If I then enter the exact
> same
> > url, this method is not getting called.
> >
> > I am not using validator at all!!
> >
> > Can anyone explain what is going on with this?
> >
> >
> >
> >
> > __________________________________
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Re: Action.execute() only being invoked the first time a url is requested ??!!!

Posted by atta-ur rehman <at...@gmail.com>.
Hi,

Most probably your page is gettnig cached by the browser. try

<head>
<META content=0 http-equiv=expires>
<META content=no-cache http-equiv=Pragma>
<META content=no-cache http-equiv=Cache-Control>
<META content=no-store http-equiv=Cache-Control>
</head>

or

<%
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0);
%>

to keep your browser from caching the page and see if it works.

HTH.

ATTA

On 11/17/05, Mon Cab <fu...@yahoo.com> wrote:
>
>
> For Example if I type in my browser address bar:
>
> http://127.0.0.1:8080/webapp/userSignup.do?action=whatever
>
> The first time, I type this in, this invokes the
> execute method of my Action class (I'm using
> System.out ("Action execute Invoked") in Action
> execute to test this). If I then enter the exact same
> url, this method is not getting called.
>
> I am not using validator at all!!
>
> Can anyone explain what is going on with this?
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>