Tag to remove jsp from cache???

2003-07-01 Thread Prashanth.S
Hi all,
Is there any tag in struts to remove cache??
Whenever i hit  Browser 'Back' button it should not take from the cache..
Any help is appreciated..
or is there any option to do that
Thanks
Prashanth


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

RE: Tag to remove jsp from cache???

2003-07-01 Thread Alex Shneyderman
Before you send any data in the response you can 
Send the following thru your response object:

% 
   response.setDateHeader (Expires, 0);
   response.setHeader (Pragma, no-cache);
   if (request.getProtocol().equals (HTTP/1.1)) {
  response.setHeader (Cache-Control, no-cache);
   }
%

Note, however that users can still go back in history
And resubmit their data. Browsers maintain history list
And unfortunately they do remember form data too. So if
Your user submitted a request and then clicks back button,
The browser will ask him/her if he/she wants to resubmit 
the data? I saw a note somewhere in Ted's (I think) book 
about how you can prevent this kind of submission on the 
server side but have not explored that further. Now I 
can't even remember where I saw it. 

The gist of it is that before you send the form to be 
submitted by the user you stamp it, and remember what is 
it you still expecting from the user inside the Session 
context. If user submits the form with the right stamp 
the request is processed, otherwise you can tell the user
to stop resubmitting the same request.

Alex.

 -Original Message-
 From: Prashanth.S [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 01, 2003 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: Tag to remove jsp from cache???
 
 Hi all,
 Is there any tag in struts to remove cache??
 Whenever i hit  Browser 'Back' button it should not take from the
cache..
 Any help is appreciated..
 or is there any option to do that
 Thanks
 Prashanth
 
 
 -
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!


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



Re: Tag to remove jsp from cache???

2003-07-01 Thread Nicolas De Loof
You can configure Struts to ad HTTP no-cache headers to every response :

in struts-config.xml :
controller nocache=true/

You can add some HTTP directives to your JSP (or tiles layouts) like this :

head
meta http-equiv=expires content=now
meta http-equiv=pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
/head

Nico.



 Before you send any data in the response you can 
 Send the following thru your response object:
 
 % 
response.setDateHeader (Expires, 0);
response.setHeader (Pragma, no-cache);
if (request.getProtocol().equals (HTTP/1.1)) {
   response.setHeader (Cache-Control, no-cache);
}
 %
 
 Note, however that users can still go back in history
 And resubmit their data. Browsers maintain history list
 And unfortunately they do remember form data too. So if
 Your user submitted a request and then clicks back button,
 The browser will ask him/her if he/she wants to resubmit 
 the data? I saw a note somewhere in Ted's (I think) book 
 about how you can prevent this kind of submission on the 
 server side but have not explored that further. Now I 
 can't even remember where I saw it. 
 
 The gist of it is that before you send the form to be 
 submitted by the user you stamp it, and remember what is 
 it you still expecting from the user inside the Session 
 context. If user submits the form with the right stamp 
 the request is processed, otherwise you can tell the user
 to stop resubmitting the same request.
 
 Alex.
 
  -Original Message-
  From: Prashanth.S [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 01, 2003 8:08 AM
  To: [EMAIL PROTECTED]
  Subject: Tag to remove jsp from cache???
  
  Hi all,
  Is there any tag in struts to remove cache??
  Whenever i hit  Browser 'Back' button it should not take from the
 cache..
  Any help is appreciated..
  or is there any option to do that
  Thanks
  Prashanth
  
  
  -
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Tag to remove jsp from cache???

2003-07-01 Thread Prashanth.S
Hi Nicolas ,
Thank u very much for ur response.
I have done whatever u said in my struts-config but i dont know how come my controller 
element is not at all getting called..
Here is my struts-config snapshot.
action-mappings
..
..
..
 
 action path=/logout
   type=gfgf
   scope=request
   forward name=Success path=/login.jsp redirect=true/
  /action
 /action-mappings
 
  controller
  processorClass=org.apache.struts.action.RequestProcessor
   debug=0
   nocache=true
contentType=text/html/

 message-resources parameter=dfggf /
 
Could u please help me in this regard.
Where should i specify controller element??[in which part of struts-config.xml]
Thanking u
Prashanth


Nicolas De Loof [EMAIL PROTECTED] wrote:
You can configure Struts to ad HTTP no-cache headers to every response :

in struts-config.xml :


You can add some HTTP directives to your JSP (or tiles layouts) like this :







Nico.



 Before you send any data in the response you can 
 Send the following thru your response object:
 
 response.setDateHeader (Expires, 0);
response.setHeader (Pragma, no-cache);
if (request.getProtocol().equals (HTTP/1.1)) {
   response.setHeader (Cache-Control, no-cache);
}
 %
 
 Note, however that users can still go back in history
 And resubmit their data. Browsers maintain history list
 And unfortunately they do remember form data too. So if
 Your user submitted a request and then clicks back button,
 The browser will ask him/her if he/she wants to resubmit 
 the data? I saw a note somewhere in Ted's (I think) book 
 about how you can prevent this kind of submission on the 
 server side but have not explored that further. Now I 
 can't even remember where I saw it. 
 
 The gist of it is that before you send the form to be 
 submitted by the user you stamp it, and remember what is 
 it you still expecting from the user inside the Session 
 context. If user submits the form with the right stamp 
 the request is processed, otherwise you can tell the user
 to stop resubmitting the same request.
 
 Alex.
 
  -Original Message-
  From: Prashanth.S [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 01, 2003 8:08 AM
  To: [EMAIL PROTECTED]
  Subject: Tag to remove jsp from cache???
  
  Hi all,
  Is there any tag in struts to remove cache??
  Whenever i hit Browser 'Back' button it should not take from the
 cache..
  Any help is appreciated..
  or is there any option to do that
  Thanks
  Prashanth
  
  
  -
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: Tag to remove jsp from cache???

2003-07-01 Thread Nicolas De Loof
use struts-config_1_1.dtd to get infos and validate your struts-config.

Your snapshot looks good. How do you know your controller element is not at all 
getting called ?

Nico.



 Hi Nicolas ,
 Thank u very much for ur response.
 I have done whatever u said in my struts-config but i dont know how come my 
 controller element is not at all getting
called..
 Here is my struts-config snapshot.
 action-mappings
 ..
 ..
 ..

  action path=/logout
type=gfgf
scope=request
forward name=Success path=/login.jsp redirect=true/
   /action
  /action-mappings

   controller
   processorClass=org.apache.struts.action.RequestProcessor
debug=0
nocache=true
 contentType=text/html/

  message-resources parameter=dfggf /

 Could u please help me in this regard.
 Where should i specify controller element??[in which part of struts-config.xml]
 Thanking u
 Prashanth


 Nicolas De Loof [EMAIL PROTECTED] wrote:
 You can configure Struts to ad HTTP no-cache headers to every response :

 in struts-config.xml :


 You can add some HTTP directives to your JSP (or tiles layouts) like this :







 Nico.



  Before you send any data in the response you can
  Send the following thru your response object:
 
  response.setDateHeader (Expires, 0);
 response.setHeader (Pragma, no-cache);
 if (request.getProtocol().equals (HTTP/1.1)) {
response.setHeader (Cache-Control, no-cache);
 }
  %
 
  Note, however that users can still go back in history
  And resubmit their data. Browsers maintain history list
  And unfortunately they do remember form data too. So if
  Your user submitted a request and then clicks back button,
  The browser will ask him/her if he/she wants to resubmit
  the data? I saw a note somewhere in Ted's (I think) book
  about how you can prevent this kind of submission on the
  server side but have not explored that further. Now I
  can't even remember where I saw it.
 
  The gist of it is that before you send the form to be
  submitted by the user you stamp it, and remember what is
  it you still expecting from the user inside the Session
  context. If user submits the form with the right stamp
  the request is processed, otherwise you can tell the user
  to stop resubmitting the same request.
 
  Alex.
 
   -Original Message-
   From: Prashanth.S [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, July 01, 2003 8:08 AM
   To: [EMAIL PROTECTED]
   Subject: Tag to remove jsp from cache???
  
   Hi all,
   Is there any tag in struts to remove cache??
   Whenever i hit Browser 'Back' button it should not take from the
  cache..
   Any help is appreciated..
   or is there any option to do that
   Thanks
   Prashanth
  
  
   -
   Do you Yahoo!?
   SBC Yahoo! DSL - Now only $29.95 per month!
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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



 -
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!


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



Re: Tag to remove jsp from cache???

2003-07-01 Thread Dan Tran
question:  can I just configure the controller .. and
dothing on the page?

-D
- Original Message - 
From: Nicolas De Loof [EMAIL PROTECTED]
Newsgroups: Struts
Sent: Tuesday, July 01, 2003 5:41 AM
Subject: Re: Tag to remove jsp from cache???


 You can configure Struts to ad HTTP no-cache headers to every response :

 in struts-config.xml :
 controller nocache=true/

 You can add some HTTP directives to your JSP (or tiles layouts) like this
:

 head
 meta http-equiv=expires content=now
 meta http-equiv=pragma content=no-cache
 meta http-equiv=Cache-Control content=no-cache
 /head

 Nico.



  Before you send any data in the response you can
  Send the following thru your response object:
 
  %
 response.setDateHeader (Expires, 0);
 response.setHeader (Pragma, no-cache);
 if (request.getProtocol().equals (HTTP/1.1)) {
response.setHeader (Cache-Control, no-cache);
 }
  %
 
  Note, however that users can still go back in history
  And resubmit their data. Browsers maintain history list
  And unfortunately they do remember form data too. So if
  Your user submitted a request and then clicks back button,
  The browser will ask him/her if he/she wants to resubmit
  the data? I saw a note somewhere in Ted's (I think) book
  about how you can prevent this kind of submission on the
  server side but have not explored that further. Now I
  can't even remember where I saw it.
 
  The gist of it is that before you send the form to be
  submitted by the user you stamp it, and remember what is
  it you still expecting from the user inside the Session
  context. If user submits the form with the right stamp
  the request is processed, otherwise you can tell the user
  to stop resubmitting the same request.
 
  Alex.
 
   -Original Message-
   From: Prashanth.S [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, July 01, 2003 8:08 AM
   To: [EMAIL PROTECTED]
   Subject: Tag to remove jsp from cache???
  
   Hi all,
   Is there any tag in struts to remove cache??
   Whenever i hit  Browser 'Back' button it should not take from the
  cache..
   Any help is appreciated..
   or is there any option to do that
   Thanks
   Prashanth
  
  
   -
   Do you Yahoo!?
   SBC Yahoo! DSL - Now only $29.95 per month!
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Tag to remove jsp from cache???

2003-07-01 Thread James Childers
 -Original Message-
 From: Dan Tran [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 01, 2003 11:20 AM
 To: Struts Users Mailing List
 Subject: Re: Tag to remove jsp from cache??? 
 
 question:  can I just configure the controller .. and
 dothing on the page?

That's correct.

See:

http://jakarta.apache.org/struts/api/org/apache/struts/config/ControllerConfig.html#nocache


 - Original Message - 
 From: Nicolas De Loof [EMAIL PROTECTED]
 Newsgroups: Struts
 Sent: Tuesday, July 01, 2003 5:41 AM
 Subject: Re: Tag to remove jsp from cache???
 
 
  You can configure Struts to ad HTTP no-cache headers to 
 every response :
 
  in struts-config.xml :
  controller nocache=true/
 
  You can add some HTTP directives to your JSP (or tiles 
 layouts) like this
 :
 
  head
  meta http-equiv=expires content=now
  meta http-equiv=pragma content=no-cache
  meta http-equiv=Cache-Control content=no-cache
  /head
 
  Nico.
 
 
 
   Before you send any data in the response you can
   Send the following thru your response object:
  
   %
  response.setDateHeader (Expires, 0);
  response.setHeader (Pragma, no-cache);
  if (request.getProtocol().equals (HTTP/1.1)) {
 response.setHeader (Cache-Control, no-cache);
  }
   %
  
   Note, however that users can still go back in history
   And resubmit their data. Browsers maintain history list
   And unfortunately they do remember form data too. So if
   Your user submitted a request and then clicks back button,
   The browser will ask him/her if he/she wants to resubmit
   the data? I saw a note somewhere in Ted's (I think) book
   about how you can prevent this kind of submission on the
   server side but have not explored that further. Now I
   can't even remember where I saw it.
  
   The gist of it is that before you send the form to be
   submitted by the user you stamp it, and remember what is
   it you still expecting from the user inside the Session
   context. If user submits the form with the right stamp
   the request is processed, otherwise you can tell the user
   to stop resubmitting the same request.
  
   Alex.
  
-Original Message-
From: Prashanth.S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject: Tag to remove jsp from cache???
   
Hi all,
Is there any tag in struts to remove cache??
Whenever i hit  Browser 'Back' button it should not 
 take from the
   cache..
Any help is appreciated..
or is there any option to do that
Thanks
Prashanth

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



Re: Tag to remove jsp from cache???

2003-07-01 Thread Dan Tran
Just to confirm,  I dont need to place the following

  META HTTP-EQUIV=Expires CONTENT=-1
  META HTTP-EQUIV=Pragma CONTENT=no-cache
  META HTTP-EQUIV=Cache-Control CONTENT=no-cache

In my pages? It is cool not to see these repeated lines
in all my pages

-Dan

- Original Message - 
From: James Childers [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 9:29 AM
Subject: RE: Tag to remove jsp from cache???


 -Original Message-
 From: Dan Tran [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 01, 2003 11:20 AM
 To: Struts Users Mailing List
 Subject: Re: Tag to remove jsp from cache???

 question:  can I just configure the controller .. and
 dothing on the page?

That's correct.

See:

http://jakarta.apache.org/struts/api/org/apache/struts/config/ControllerConfig.html#nocache


 - Original Message - 
 From: Nicolas De Loof [EMAIL PROTECTED]
 Newsgroups: Struts
 Sent: Tuesday, July 01, 2003 5:41 AM
 Subject: Re: Tag to remove jsp from cache???


  You can configure Struts to ad HTTP no-cache headers to
 every response :
 
  in struts-config.xml :
  controller nocache=true/
 
  You can add some HTTP directives to your JSP (or tiles
 layouts) like this
 :
 
  head
  meta http-equiv=expires content=now
  meta http-equiv=pragma content=no-cache
  meta http-equiv=Cache-Control content=no-cache
  /head
 
  Nico.
 
 
 
   Before you send any data in the response you can
   Send the following thru your response object:
  
   %
  response.setDateHeader (Expires, 0);
  response.setHeader (Pragma, no-cache);
  if (request.getProtocol().equals (HTTP/1.1)) {
 response.setHeader (Cache-Control, no-cache);
  }
   %
  
   Note, however that users can still go back in history
   And resubmit their data. Browsers maintain history list
   And unfortunately they do remember form data too. So if
   Your user submitted a request and then clicks back button,
   The browser will ask him/her if he/she wants to resubmit
   the data? I saw a note somewhere in Ted's (I think) book
   about how you can prevent this kind of submission on the
   server side but have not explored that further. Now I
   can't even remember where I saw it.
  
   The gist of it is that before you send the form to be
   submitted by the user you stamp it, and remember what is
   it you still expecting from the user inside the Session
   context. If user submits the form with the right stamp
   the request is processed, otherwise you can tell the user
   to stop resubmitting the same request.
  
   Alex.
  
-Original Message-
From: Prashanth.S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject: Tag to remove jsp from cache???
   
Hi all,
Is there any tag in struts to remove cache??
Whenever i hit  Browser 'Back' button it should not
 take from the
   cache..
Any help is appreciated..
or is there any option to do that
Thanks
Prashanth

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


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