Request Processor is a simple object of org.apache.struts.action.RequestProcessor class which handles the HTTP specific request and response after getting the control from the ActionServlet by calling process(). Steps of Struts Request Processing flow : 1. Clicking on submit button from JSP page, container invokes the doPost() or doGet() method based on the type of action performed.  2. Control go to the ActionServlet which delegates...
Action class must be configured in the struts-config.xml file so that container must have the information for which action it has to forward to which Action class. That's is why we are configuring the Action classes. For each action from the JSP page we are writing each Action class, previously in servlet we were writing Servlet class for each action performed but in Struts we are writing simple Action class but capable of handling HttpServletRequest...
As ActionServlet is simple Servlet class only but designed using the Front Controller Design Patern so it must be configured in the web.xml file at the container itself only, so that every request must be followed by ActionServlet. Web.xml file <servlet> <servlet-name>login</servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config</param-name> ...
We can write our own Action class using Struts framework but need to extends Action class of org.apache.struts.action package and need to override execute() method which return the ActionForward class object and which must be return by calling the findForward() method with ActionMapping reference and hence control will transfer to the caller i.e RequestProcessor. Description about execute() public ActionForward execute(ActionMapping mapping,...
All the Request by the client are get processed by the ActionServlet only then get forwarded to the Request Processor. ActionServlet is a single Servlet designed by the Apache using Front Controller Design Pattern. It follows the life cycle of the Servlet  by calling init() method then doPost() or doGet() and finally destroy(). Internal Implementation of the ActionServlet    public class ActionServlet extends HttpServlet { ...
Following task are performed at the Container start-up in Struts based Application. They are : 1. Container make sure about the web configuration file i.e web.xml whether is available or not. 2. If not available then Container will not be initialized and hence fails to start. 3. If available then Container will parse/read the web.xml file and store the required information in the main memory. 4. Then Container will create the ServletContext...
Steps to follow for developing Struts Application using Eclipse :- We must have to follow some of the basic steps to develop any struts application using the Eclipse IDE. 1. Create Dynamic Web Project. 2. Copy all the 10 jars provided by the struts vendor to the WEB-INF/lib folder + 1 servlet-api.jar. 3. Copy all the 6 tld files to the WEB-INF folder ( not necessary )     (Only when if developer want to use some pre-defined tags...
Most importantly Struts 1 is a web framework which is internally implemented using Servlet and JSP technologies. This web framework is designed by Apache Software Foundation in 2001 keeping in view to reduce the task of the developer and maintenance issue which was much in Servlet. Struts framework is implemented based      -> MVC Architecture      -> Front Controller Design Pattern      ->...
Why Hibernate  Hibernate Architecture  Hibernate Session Factory Hibernate Session Hibernate Cache  Hibernate Transaction Hibernate Transaction Management  Open Session In View (OSIV) Alternative to OSIV  n+1 problem in Hibernate and its solution    ...
Hibernate Transaction is associated with each operation we are performing within a session. We have to use org.hibernate.Transaction class to perform transaction in hibernate. How Transaction object get initialized ? As we know translation is associated with the session , so we can initialize Transaction using the beginTransaction() method which is a abstract method in Session interface and returns the Transaction object.  After...
In case of JDBC we the developer are responsible for establishing and terminating the database connection but in case of Hibernate, it is only responsible for establishing and terminating database Connectivity , we only need to indicate by simply calling some pre-defined method by the hibernate session. For ex- After getting the SessionFactory which holds all the information about the database by reading the hibernate Configuration file, need...

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

Online Members

Live Traffic