Struts in Java

Suppose we create a application where we need to create a login page for user On passing correct credential user should be able to go at login success page while in case of errors user should go to login page again.
A typical flow of struts application would be like below. 

First user will login from browser to open userLogin.jsp. This  HttpRequest will go to applications Web.xml File. with help of  request url, Web.xml file will find that its a struts request so it will reroute via ActionServlet. Action Servlet will get correct action mapping from Struts-config.xml.
Request Processor will dispatch request with mapping & configuration information to get Action form. Action form validation will happen &  In case of any error response will go to browser.
If there is no error Action class execute method will be called. After performing action class logic action forward will be set as success or failure or anything. Based on result it will send HttpReponse to jsp which could be either success page or failure or original login page based how we have defined mapping in struts-config.xml.


Popular posts from this blog

Conversion from Clob To String in java and Vice versa

Portable Java 8/ JDK8 setup without admin rights

Multi Threading , Producer consumer problem in Java