File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to handle multiple requests in struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to handle multiple requests in struts?" Watch "How to handle multiple requests in struts?" New topic
Author

How to handle multiple requests in struts?

Anuj Singh
Ranch Hand

Joined: May 04, 2007
Posts: 47
Hi Friends,
Here is a scenario:
Suppose at the home page of an application,two users A&B enter their respective User Ids as A&B and click submit simultaneously.How will the request be handled?
With whose value will the formBean be populated?If somewhere in execute method we call the formBean's get() method,
then whose value will the method return?A's user id or B's?I mean how does struts handle multiple simultaneous requests?

Thanks
Anuj


SJCP 1.5 with 93%.Preparing for WCD
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Each user has their own form bean, either in their session or request.
Anuj Singh
Ranch Hand

Joined: May 04, 2007
Posts: 47
either in their session or request.


Default would be request or session scope for each user as he/she logs in?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to handle multiple requests in struts?