<--Previous Next -->
Based on the above diagram,
one can explain the user's request life cycle in Struts 2 as follows:
1.
User sends a request to the server for requesting for
some resource (i.e. pages).
2.
The FilterDispatcher looks at the request and then
determines the appropriate Action.
3.
Configured interceptors functionalities apply such as
validation, file upload etc.
4.
Selected action is executed to perform the requested
operation.
5.
Again, configured interceptors are applied to do any
post-processing if required.
6.
Finally the result is prepared by the view and returns
the result to the user.
Jars needed to run
Struts 2 applications:
- We can download the latest jars of struts2 frame work from the following link. http://struts.apache.org/download.cgi
- Extract the downloaded folder. We will see the folder with the name ‘Struts-version’. Inside that folder there is folder called ‘lib’. We can find all the jars that are needed to run the struts 2 applications.
- There are many jars in that folder for multiple purposes. But to run the basic Struts 2 application we need the following jars.
a.
commons-logging-1.1.1.jar
b.
commons-fileupload-1.2.2.jar
c.
commons-io-2.0.1
d.
commons-lang-3.3.1
e.
freemarker-2.3.19.jar
f.
ognl-3.0.6.jar
g.
struts2-core-2.3.8.jar
h.
xwork-2.3.8.jar
i.
sturts2-convention-plugin-2.3.8
The last jar that is
struts2-convention-plugin-2.3.8.jar is needed if we are using annotions.
Note: The version numbers may be different, those are
based on the struts2 version you downloaded.
No comments:
Post a Comment