Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

January 23, 2011

Struts - Controller


In a Struts application, two components make up the Controller. These two components are the
org.apache.struts.action.ActionServlet and the org.apache. struts.action.Action classes. In most Struts
applications, there is one org. apache.struts.action.ActionServlet implementation and many org.apache.
struts.action.Action implementations. ActionServlet acts as an Action factory by creating specific Action classes based on the user’s
request.


The org.apache.struts.action.ActionServlet is the Controller component that handles client requests and
determines which org.apache.struts.action.Action will process the received request. When assembling simple
applications, the default ActionServlet will satisfy your application needs,
and therefore, you do not need to create a specialized org.apache.struts.action.ActionServlet implementation.

Also, we generally use Action Mappings as *.do, but we do not append that in URL. This is because when we use , .do is automatically appended. 


No comments: