• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prefer hidden field instead of session attribute

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic