Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
Apache Struts is an open-source framework for
developing Java EE web applications.
It uses and extends
the Java Servlet API to encourage developers to adopt a
model-view-controller
(MVC) architecture.
Divides the overall functionality of an application into three layers:
Model Layer – Contains the
functional business logic of the application, as well as a
representation
of the persistently stored data backing
the application
View Layer – Contains the user interface, including mechanisms to accept user input and render results
Controller Layer – Contains
the logic that manages the flow of individual requests,
dispatching to the
appropriate business logic
component
ActionServlet provides the
"controller" in the Model-View-Controller (MVC)
design pattern for web
applications that is commonly
known as "Model 2"
The
RequestProcessor selects and invokes an Action class to perform
the requested business
logic, or delegates the response
to another resource.
Standard Request Processing Lifecycle
1:
processLocale() -- Record user's
locale preference (if not already present)
processPreprocess() -- general purpose pre-processing hook
processMapping() -- select Action to be utilized
processRoles() -- perform security role-based restrictions on
action execution
processActionForm() -- Create or
acquire an appropriate ActionForm instance
Sample Action Class :
public class UserAction extends
DispatchAction {
public ActionForward add(ActionMapping mapping, ActionForm
form,
HttpServletRequest request, HttpServletResponse response) {
}
public ActionForward update(ActionMapping mapping, ActionForm
form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UserForm userForm = (UserForm) form;
userForm.setMessage("Inside update user
method.");
return mapping.findForward(SUCCESS);
}
}
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.