Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using ActionForm

 
Priya Venkatesan
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.
 
Karthik Guru
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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!