my dog learned polymorphism*
The moose likes Struts and the fly likes Need Clear Struts Navigation Flow 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 "Need Clear Struts Navigation Flow" Watch "Need Clear Struts Navigation Flow" New topic
Author

Need Clear Struts Navigation Flow

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
1) When first the request is made from a JSP/HTML/XSLT to the server , the controll first reaches Web.xml file.
2) it checks the mapping for /something.do in web.xml and finds the ActionServlet and loads ActionServlet.
3) As part of loading ActionServlet calls the init() as every other servlet does.
4) in init() it takes the init-parameters as struts-config.xml and loads the xml file.
what will happen in struts-config.xml ,how control goes to Business logic.I know Action class invokes business logic in model.
If any data fetched from database , that will be stored in java beans. How this bean can be accessed to display outputs.
please explain the struts complete flow after 4th step.
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
i cant understand meaning of following : "In Action class , have execute() which have return type of ActionForward. We can specify the business logic in Model and provide that object in execute(). " How Action class invokes business logic?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Rajendra Prakash wrote:i cant understand meaning of following : "In Action class , have execute() which have return type of ActionForward. We can specify the business logic in Model and provide that object in execute(). " How Action class invokes business logic?

By calling a method on an object.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please go through some basic Struts tutorials; they will address all of these problems.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Clear Struts Navigation Flow