• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Using session or request, in Struts

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my app, I have some kind of jsp pages may be accessed from different entries, should I use session or request as the scope of form bean?

for instance, I have a order select screen. this page can be accessed from purchase order selection and sales order selection and etc. If I set the order select form bean into session, I will be in trouble if two order selection screen opened at the same time.

but if I don't set the form bean into session, and use request instead, it would be hard for me to remember the purchase order form bean or sales order form bean.

I'm sure most of you have the same problem, how did you handle it?
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"I will be in trouble if two order selection screen opened at the same time" - how would this be achieved? By opening two browsers? I thought by opening two browsers, you'd get two sessions, and your form bean would be safe.
Alternatively, you could keep your form bean as request scope, but put whatever other information you need in your session scope - this can then be accessed from your actions.

Andy
 
Let nothing stop you! Not even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic