This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Bean and memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Bean and memory" Watch "Bean and memory" New topic

Bean and memory

Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
<jsp:useBean id="Params" class="" scope="page" />
<jsp:setProperty name="Params" property="*" />
I am creatting a bean like this which will check the validitty of individual parameters in the request.
So the problem is that an instance of this bean is made each time when the request is made which will consume a lot of memmory as the time grows.
Is it possible for me to implement in any other ways

I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Jayson Falkner
Ranch Hand

Joined: May 07, 2001
Posts: 57
Using page scope also means the bean will be recycled after the page is done. Keeping the setup you have right now should be perfectly fine.
Jayson Falkner
V.P./CTO, Amberjack Software LLC

Jayson Falkner<br /><br />Author of <a href="" target="_blank" rel="nofollow">Servlets and JavaServer Pages; the J2EE Web Tier</a>
I agree. Here's the link:
subject: Bean and memory
jQuery in Action, 3rd edition