This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Websphere and the fly likes Prefer hidden field instead of session attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Prefer hidden field instead of session attribute " Watch "Prefer hidden field instead of session attribute " New topic
Author

Prefer hidden field instead of session attribute

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
In my application we have around 17 jsp for getting information
from the user.
Also we have around 65 jsp for user navigation

This 17 jsp has average 19 html components like textbox,
select etc

To maintain user entered data we prefer hidden field than
session attribute.

Number of user: 1, 00,000
Server: WebSphere Application Server v6.1
Framework: struts 1

For every new module in our project we add corresponding
variable in all the forms and there jsp to maintain the user entered data.

I know that this is an extra work and changing the other module
code just to retain the user information is not a good design.

But we believe that putting the struts form in session will
lead to memory out for 1, 00,000 user

Please guide me is this approach right or wrong?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

Jayaraj,
Is that 100 thousand or a million users. Are they all on at the same time? How much memory do you have? How big is your Struts form? Do you have session persistence turned on.

These are the answers that will guide your choice.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Johnny Brown
Greenhorn

Joined: Jul 27, 2009
Posts: 10
Jeanne, I think Jayaraj's number is 100k (1 lakh?!).

Jayaraj, unless you have 100k concurrent users, accessing ActionForm shouldn't be a problem (assuming your server have good memory for processing).
Keep on adding hidden fields for every page(module), will lead to maintenance nightmare.

To me, you should change your approach.
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
Johnny Brown wrote:Jeanne, I think Jayaraj's number is 100k (1 lakh?!).

Jayaraj, unless you have 100k concurrent users, accessing ActionForm shouldn't be a problem (assuming your server have good memory for processing).
Keep on adding hidden fields for every page(module), will lead to maintenance nightmare.

To me, you should change your approach.


for 32 bit processor, only 1.6GB of heap can be allocated. when there are 100k , we definitely get out of memory error if we are storing it in session, i know hidden fields are difficult to maintain. there is no other easy approach other than session persistence / hidden fields
 
 
subject: Prefer hidden field instead of session attribute
 
Similar Threads
Field level security
Struts <html:text ... issue.
Session state help
Struts & Tiles frame work issue
ICE 287 answers for WebSphere 5.0