[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No Subject



 If you are using jsp, use the jsp:useBean  tag and set the scope to
application.  For example

<jsp:useBean class="foo.Counter" scope="application" />

The servlet equivalent of the above useBean action is:

foo.Counter counter =
(foo.Counter)getServletContext().getAttribute("counter");
if (counter == null) {
  counter = new foo.Counter();
  getServletContext().setAttribute("counter", counter);
}

Hope this would be helpful.....

Regards
--Vikas

----- Original Message -----
From: Gudavalli, Manidhar
To: 'Nie, Junge X.'
Cc: 'ajug-members@ajug.org'
Sent: Sunday, August 04, 2002 8:19 PM
Subject: RE: cacheing jsp/servet


I am trying to cache the entire Httprequest . How to get just content out of
the request. I am using ATG Dyanmo application server.  At the end of my
JSP/JHTML page  I would like to take the entire generated content and put it
in memory? May be this is basic question. But I am not able to find API for
this.
thank in Advance.
MANI
-----Original Message-----
From: Nie, Junge X. [mailto:JXNie@ups-scs.com]
Sent: Thursday, July 18, 2002 8:32 AM
To: Gudavalli, Manidhar
Cc: ajug-members@ajug.org
Subject: RE: cacheing jsp/servet


You can have the data you want in the session(how big is your data, if it is
too big, not good idea keep big data in session). Also the data is related
with user. have the session time out the way you want. The time out value
you need to put in the web.xml file.

There are other ways to cache: like singleton cache - have your own cache
object, implement this object as singleton. This will require more work then
session.

Hope this help.

Junge
-----Original Message-----
From: Gudavalli, Manidhar [mailto:manidhar.gudavalli@eds.com]
Sent: Thursday, July 18, 2002 9:04 AM
To: ajug-members@ajug.org
Subject: cacheing jsp/servet


HI

I am working on performace improvements to our application server (ATG). Can
I cache a response to a request?

There is some data which is not updated too freqent and it is ok to show the
same data for 30 min. So, what I want to do is avoid buiding response only
first time and for the next 30 min if the request come I got to send the
same resonse.
Can I do it in application sever like ATG on servlets?

thanks
MANI
Manidhar.Gudavalli@eds.com


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02