aspose file tools*
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
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: 30537
    
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prefer hidden field instead of session attribute