Re: cache design pattern

2003-09-09 Thread Vic Cekvenic
In general, "data" caching should happen at the data (model of MVC) layer.
DAO's like iBatis and Hibernate do caching automatically, you just 
configure a decay time in XML.
hth,
.V

[EMAIL PROTECTED] wrote:
hi all,

I would like to implement a cache design pattern in
my framework.
before re-inventing the wheel, I would like to ask to
thoses who have already done that.
Sample codes, advices are welcome.
thanks in advance.

Meissa

L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.
The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or dissemination is prohibited.
If you are not the intended recipient of this message, then please delete it and 
notify the sender.


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


RE: Cache problem

2003-02-23 Thread Mohan Radhakrishnan
Hi,
   An addendum to this problem.

What other cache are there apart from the browser cache. Tomcat server
cache ? Ways to disable it ? Our application has stopped dead in its tracks.
Thanks,
Mohan

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 9:03 AM
To: 'Struts Users Mailing List'
Subject: Cache problem


Hi,
I'm facing the following problem with the cache.

This is my javascript.
menu.addMenuItem("TCP vs. UDP vs.
ICMP","location='generic.action?report=21'");

1. This calls GenericAction and puts the report parameter in the session
and forwards to a JSP that displays some descriptive text.

This description JSP has the following




2. My web.xml has


  nocache
  true


Now my GenericAction is not called always when the menu is clicked. This has
caused severe problems.


What are we doing wrong here ? Is there a better solution for this ?
Appreciate any help.

Thanks,
Mohan

-
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: cache the response and cache-example.war

2003-02-18 Thread Mitchell Morris
Alternately, there is a nice cache in Jakarta Turbine
(http://jakarta.apache.org/turbine/jcs/).

doesn't-everybody-write-one-of-these-eventually-ly y'rs,
+Mitchell

> -Original Message-
> From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 12:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: cache the response and cache-example.war
>
>
> Look at OSCache from opensymphony.com
>
>
> | -Original Message-
> | From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
> | Sent: Tuesday, February 18, 2003 10:52 AM
> | To: Struts Users Mailing List
> | Subject: cache the response and cache-example.war
> |
> | Hello,
> |  Is there any other way to cache it? Cuz I am
> concerned that the
> | application is very big and it may slow down the server.
> Besides, where to
> | download the cache-example.war of jakarta? The links are
> all dead. Thank
> | you.
> |  ginger
> |
> | At 05:22 PM 2/18/2003 +0100, you wrote:
> | >Just declare your formbean as "session" scoped, so it will
> be avaible to
> | >build another view (another JSP)
> | >
> | >Nico.
> | >
> | > > Hi,
> | > >  I think I need to make it clearer. I need to cache the
> | response
> | >so
> | > > I can give the user the option to represent the data in
> another format
> | > > other than the one in the immediate response jsp page.
> I check the
> | cache
> | > > tag but what I want to cache is the form bean from
> server other than
> | part
> | > > of the jsp page. Can anyone help me with this? Thank you.
> | > >  ginger
> | > >
> | > > At 10:51 AM 2/18/2003 -0500, you wrote:
> | > > >Hello,
> | > > > I need to cache the response of last request.
> Can anyone
> | tell me
> | > > > how to do that in Struts? Any help is appreciated.
> | > > > ginger
> | > > >
> | > > >
> | > >
> >-
> | > > >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]
> | >
> | >
> |
> >-
> | >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]
>
>
> -
> 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: cache the response and cache-example.war

2003-02-18 Thread Chen, Gin
Someone gave me this a while back.

<%
if (jScriptOutput != null) {
  out.print(jScriptOutput);
} else {
  javax.servlet.jsp.tagext.BodyContent bc = pageContext.pushBody();
  out = bc;
%>
<%-- any arbitrary JSP/HTML/JavaScript here --%>


<%
  out = pageContext.popBody();
  jScriptOutput = bc.getString();
  out.print(jScriptOutput);
}
%>
-Tim

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 11:52 AM
To: Struts Users Mailing List
Subject: cache the response and cache-example.war


Hello,
 Is there any other way to cache it? Cuz I am concerned that the 
application is very big and it may slow down the server. Besides, where to 
download the cache-example.war of jakarta? The links are all dead. Thank
you.
 ginger

At 05:22 PM 2/18/2003 +0100, you wrote:
>Just declare your formbean as "session" scoped, so it will be avaible to
>build another view (another JSP)
>
>Nico.
>
> > Hi,
> >  I think I need to make it clearer. I need to cache the response
>so
> > I can give the user the option to represent the data in another format
> > other than the one in the immediate response jsp page. I check the cache
> > tag but what I want to cache is the form bean from server other than
part
> > of the jsp page. Can anyone help me with this? Thank you.
> >  ginger
> >
> > At 10:51 AM 2/18/2003 -0500, you wrote:
> > >Hello,
> > > I need to cache the response of last request. Can anyone tell
me
> > > how to do that in Struts? Any help is appreciated.
> > > ginger
> > >
> > >
> > >-
> > >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]
>
>
>-
>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]

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




RE: cache the response and cache-example.war

2003-02-18 Thread Jacob Hookom
Look at OSCache from opensymphony.com


| -Original Message-
| From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
| Sent: Tuesday, February 18, 2003 10:52 AM
| To: Struts Users Mailing List
| Subject: cache the response and cache-example.war
| 
| Hello,
|  Is there any other way to cache it? Cuz I am concerned that the
| application is very big and it may slow down the server. Besides, where to
| download the cache-example.war of jakarta? The links are all dead. Thank
| you.
|  ginger
| 
| At 05:22 PM 2/18/2003 +0100, you wrote:
| >Just declare your formbean as "session" scoped, so it will be avaible to
| >build another view (another JSP)
| >
| >Nico.
| >
| > > Hi,
| > >  I think I need to make it clearer. I need to cache the
| response
| >so
| > > I can give the user the option to represent the data in another format
| > > other than the one in the immediate response jsp page. I check the
| cache
| > > tag but what I want to cache is the form bean from server other than
| part
| > > of the jsp page. Can anyone help me with this? Thank you.
| > >  ginger
| > >
| > > At 10:51 AM 2/18/2003 -0500, you wrote:
| > > >Hello,
| > > > I need to cache the response of last request. Can anyone
| tell me
| > > > how to do that in Struts? Any help is appreciated.
| > > > ginger
| > > >
| > > >
| > > >-
| > > >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]
| >
| >
| >-
| >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]


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




Re: cache the response of a request in struts?

2003-02-18 Thread Nicolas De Loof
Just declare your formbean as "session" scoped, so it will be avaible to
build another view (another JSP)

Nico.

> Hi,
>  I think I need to make it clearer. I need to cache the response
so
> I can give the user the option to represent the data in another format
> other than the one in the immediate response jsp page. I check the cache
> tag but what I want to cache is the form bean from server other than part
> of the jsp page. Can anyone help me with this? Thank you.
>  ginger
>
> At 10:51 AM 2/18/2003 -0500, you wrote:
> >Hello,
> > I need to cache the response of last request. Can anyone tell me
> > how to do that in Struts? Any help is appreciated.
> > ginger
> >
> >
> >-
> >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]


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




RE: Cache

2003-02-14 Thread Mohan Radhakrishnan
Hi,
   If this is true then there is no way make sure that the struts action
will be hit ? We show a description page that is just text. But the Generic
forward action that forwards to description.jsp also takes a report ID and
puts in the session. Sometimes the action wasn't fired because - we think -
the browser picked it up from the cache. So the report ID became stale.

   So finally we used this




 
 The "-1" value - I don't have an explanation for that. The original value
was "0". It worked. Maybe it will fail during rigorous testing.

Mohan

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 9:42 PM
To: [EMAIL PROTECTED]
Subject: Re: Cache


You can use various http headers to tell the browser to not cache the pages.

  There's no guarantee that the browsers will follow your suggestion though.

  It sounds like you're trying to control the user too much.

David



>From: Gus Delgado <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: Cache
>Date: Thu, 13 Feb 2003 10:53:53 -0500
>
>Is there any way to clean the cache from an Action. I have a LogoutAction 
>that gets all of the Attributes in the session by name and removes all of 
>them + it invalidates the session, but I also want to clear the cache so 
>that when the user hits the back button nothing will be there.
>
>Is there any way to do this?
>
>-thanks
>Gus
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-
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: Cache

2003-02-13 Thread Gus Delgado
This works thanks.

In order for it to work the user has to do a "Post" in the page then if 
you go to a different page and try to comeback the page will be expired, 
but what about if the user does not do anything on the page, or if the 
user hits a hyperlink, those two do not create a post, so if you go to a 
different page and hit the back button the page will be there.

-Gus
Kris Schneider wrote:

For 1.0.2, set the servlet init param "nocache" to "true"

Gus Delgado wrote:


too late in the project to run that risk!!

Alvarado, Juan (c) wrote:


Oh yeah that would be a problem. Can't you upgrade?? It's suppose to be
backwards compatible.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: Cache


I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

 

Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't 
have to do
anything initially, but in the event you ever need to implement 
some of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with 
. Where does it actually go and what would my 
processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:



 

We have used the following as a means of expiring pages. This way 
when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by 
name and removes all of them + it invalidates the session, but I 
also want to clear the cache so that when the user hits the back 
button nothing will be there.

Is there any way to do this?

-thanks
Gus


-
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]




 




-
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]


.



  





-
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]


.

 




-
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: Cache

2003-02-13 Thread Kris Schneider
For 1.0.2, set the servlet init param "nocache" to "true"

Gus Delgado wrote:

too late in the project to run that risk!!

Alvarado, Juan (c) wrote:


Oh yeah that would be a problem. Can't you upgrade?? It's suppose to be
backwards compatible.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: Cache


I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

 

Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't have 
to do
anything initially, but in the event you ever need to implement some 
of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with 
. Where does it actually go and what would my 
processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:



  

We have used the following as a means of expiring pages. This way 
when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name 
and removes all of them + it invalidates the session, but I also 
want to clear the cache so that when the user hits the back button 
nothing will be there.

Is there any way to do this?

-thanks
Gus


-
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]




 



-
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]


.



  




-
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]


.

 




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



--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>



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




Re: Cache

2003-02-13 Thread Gus Delgado
too late in the project to run that risk!!

Alvarado, Juan (c) wrote:


Oh yeah that would be a problem. Can't you upgrade?? It's suppose to be
backwards compatible.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: Cache


I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

 

Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
anything initially, but in the event you ever need to implement some of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:



   

We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name and 
removes all of them + it invalidates the session, but I also want to 
clear the cache so that when the user hits the back button nothing will 
be there.

Is there any way to do this?

-thanks
Gus


-
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]




  

 


-
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]


.



   




-
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]


.

 




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




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
Oh yeah that would be a problem. Can't you upgrade?? It's suppose to be
backwards compatible.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: Cache


I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

>Yeah sure I apologize for not being more detailed.
>
>It goes in your struts-config file. I have mine right after the action
>mappings, but it might not matter where you put it.
>
>Your subclass would be a subclass of
>org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
>anything initially, but in the event you ever need to implement some of the
>methods in it in your application, you have a class ready for it.
>
>I would suggest you read the javadoc on this class.
>
>Good luck.
>
>-Original Message-
>From: ajTreece [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 13, 2003 11:55 AM
>To: Struts Users Mailing List
>Subject: Re: Cache
>
>
>Juan
>
>Could you be a little more specific... I'm not familiar with ...>. Where does it actually go and what would my processor subclass be?
>
>Thanks...
>
>
>
>Alvarado, Juan (c) wrote:
>
>  
>
>>We have used the following as a means of expiring pages. This way when the
>>user hits the back button they will get a page has expired message.
>>
>>>processorClass="your.processor.subclass">
>>
>>-Original Message-
>>From: Gus Delgado [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, February 13, 2003 10:54 AM
>>To: Struts Users Mailing List
>>Subject: Cache
>>
>>
>>Is there any way to clean the cache from an Action. I have a 
>>LogoutAction that gets all of the Attributes in the session by name and 
>>removes all of them + it invalidates the session, but I also want to 
>>clear the cache so that when the user hits the back button nothing will 
>>be there.
>>
>>Is there any way to do this?
>>
>>-thanks
>>Gus
>>
>>
>>-
>>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]
>>
>>
>> 
>>
>>
>>
>
>
>
>-
>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]
>
>
>.
>
>  
>



-
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: Cache

2003-02-13 Thread Gus Delgado
I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
anything initially, but in the event you ever need to implement some of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:

 

We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name and 
removes all of them + it invalidates the session, but I also want to 
clear the cache so that when the user hits the back button nothing will 
be there.

Is there any way to do this?

-thanks
Gus


-
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]




   




-
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]


.

 




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




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
anything initially, but in the event you ever need to implement some of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:

>We have used the following as a means of expiring pages. This way when the
>user hits the back button they will get a page has expired message.
>
>processorClass="your.processor.subclass">
>
>-Original Message-
>From: Gus Delgado [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 13, 2003 10:54 AM
>To: Struts Users Mailing List
>Subject: Cache
>
>
>Is there any way to clean the cache from an Action. I have a 
>LogoutAction that gets all of the Attributes in the session by name and 
>removes all of them + it invalidates the session, but I also want to 
>clear the cache so that when the user hits the back button nothing will 
>be there.
>
>Is there any way to do this?
>
>-thanks
>Gus
>
>
>-
>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]
>
>
>  
>



-
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: Cache

2003-02-13 Thread David Graham
 is in the struts-config.xml file.  See the dtd for details.

David




From: ajTreece <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Cache
Date: Thu, 13 Feb 2003 10:55:18 -0600

Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:

We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a LogoutAction 
that gets all of the Attributes in the session by name and removes all of 
them + it invalidates the session, but I also want to clear the cache so 
that when the user hits the back button nothing will be there.

Is there any way to do this?

-thanks
Gus


-
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]







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



_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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



Re: Cache

2003-02-13 Thread ajTreece
Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:

We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.


processorClass="your.processor.subclass">

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name and 
removes all of them + it invalidates the session, but I also want to 
clear the cache so that when the user hits the back button nothing will 
be there.

Is there any way to do this?

-thanks
Gus


-
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]


 




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




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.



-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name and 
removes all of them + it invalidates the session, but I also want to 
clear the cache so that when the user hits the back button nothing will 
be there.

Is there any way to do this?

-thanks
Gus


-
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: Cache

2003-02-13 Thread Gus Delgado
Yeah I tried adding this at the end of the action.

response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires", "Wed, 26 Feb 1997 08:21:57 GMT");

I tested it but it does not seem to work on either IE or Mozilla

David Graham wrote:


You can use various http headers to tell the browser to not cache the 
pages.  There's no guarantee that the browsers will follow your 
suggestion though.  It sounds like you're trying to control the user 
too much.

David



From: Gus Delgado <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Cache
Date: Thu, 13 Feb 2003 10:53:53 -0500

Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name 
and removes all of them + it invalidates the session, but I also want 
to clear the cache so that when the user hits the back button nothing 
will be there.

Is there any way to do this?

-thanks
Gus


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



_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-
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: Cache

2003-02-13 Thread David Graham
You can use various http headers to tell the browser to not cache the pages. 
 There's no guarantee that the browsers will follow your suggestion though. 
 It sounds like you're trying to control the user too much.

David



From: Gus Delgado <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Cache
Date: Thu, 13 Feb 2003 10:53:53 -0500

Is there any way to clean the cache from an Action. I have a LogoutAction 
that gets all of the Attributes in the session by name and removes all of 
them + it invalidates the session, but I also want to clear the cache so 
that when the user hits the back button nothing will be there.

Is there any way to do this?

-thanks
Gus


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


_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Re: Cache reload

2001-06-28 Thread Duffiana Jones

hi,

the init() function of a servlet is called only once, when the servlet
class is loaded by the container. so, to achieve your periodic refresh,
you may want to start a thread within the servlet container. IMHO that
does not follow the spirit of the J2EE programming practices.

A way we choosed for a commercial project was to have a daemon (in fact
a RMI servant) which was acting as a periodicaly refreshed cache, but
executing outside the servlet container, in its proper JVM. servlet (or
web tier) can then communicate with the cache using RMI.


for a smaller (or less distributed) project, I think I would do this
rather by improving the accessors within the cache objet, in a way like
this : when the getter (whichever it is) is called, it evaluates
something like (now-last_time_i_refreshed), and if that's greater than
the periodicity you need, the cache reload the appropriate values, and
then return them to the caller.


hope this helps.

duf.


"Zeltser, Mark" a écrit :
> 
> Hello,
> 
> I need to have my cache refreshed every hour. I extended ActionServlet and
> overwrote init() method, adding function to initialize and refresh cache. I
> am using Timer class for refreshing Cache class. Can this cause any problems
> with servlet containers? What is the right technique to do this?
> 
> Thanks, Mark.
> 
> --
> This message is intended only for the personal and confidential use of the 
>designated recipient(s) named above.  If you are not the intended recipient of this 
>message you are hereby notified that any review, dissemination, distribution or 
>copying of this message is strictly prohibited.  This communication is for 
>information purposes only and should not be regarded as an offer to sell or as a 
>solicitation of an offer to buy any financial product, an official confirmation of 
>any transaction, or as an official statement of Lehman Brothers.  Email transmission 
>cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that 
>this information is complete or accurate and it should not be relied upon as such.  
>All information is subject to change without notice.