• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prefer hidden field instead of session attribute

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Johnny Brown
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic