Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Using ActionForm

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam a struts newbie and I have this basic question about using ActionForms.
My understanding is that when you declare an ActionForm as request scope in struts-config.xml, then the framework would create one if no instance exsits else use the one thats already present.

My Question is:
What happens when multiple requests come in and share the same instance of the ActionForm? If one request calls the reset() fn while the other request is calling validating fn, are they not stepping on each others toes. Is something wrong with my understanding? Please let me know.
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
imo, you answered your question in the beginning.
scope = request --> one form / request.
So if you have multiple requests coming in , it w�d result in as many AcitonForm instances. So it w'dnt result in any conflict.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!