Let’s start with developing your first Struts application. Here are the steps involved in creating the Struts application.
1)Add relevant entries into the web.xml
a. Add ActionServlet Configuration with initialization parameters
b. Add ActionServlet Mapping
c. Add relevant taglib declaration
2)Start with a blank template for the struts-config.xml. In the struts-config.xml, add the following
a. Declare the RequestProcessor
b. Create a properties file and declare it as Message Resource Bundle
c. Declare the Message Resource Bundle
d. Declare the Form-bean
e. Declare the ActionMapping for the Form-bean
f. Add the forwards in the ActionMapping
3)Create the Form-bean class
4)Create the JSP with Struts tags
5)Create the Action class
6)For every <bean:message> tag in the JSP, add key value pairs to the Message Resource Bundle (properties file) created in Step 2b
7)Add Validation in the Form-bean
8)Define the error messages in the Message Resource Bundle
9)Create the rest of the JSPs.
1)Add relevant entries into the web.xml
a. Add ActionServlet Configuration with initialization parameters
b. Add ActionServlet Mapping
c. Add relevant taglib declaration
2)Start with a blank template for the struts-config.xml. In the struts-config.xml, add the following
a. Declare the RequestProcessor
b. Create a properties file and declare it as Message Resource Bundle
c. Declare the Message Resource Bundle
d. Declare the Form-bean
e. Declare the ActionMapping for the Form-bean
f. Add the forwards in the ActionMapping
3)Create the Form-bean class
4)Create the JSP with Struts tags
5)Create the Action class
6)For every <bean:message> tag in the JSP, add key value pairs to the Message Resource Bundle (properties file) created in Step 2b
7)Add Validation in the Form-bean
8)Define the error messages in the Message Resource Bundle
9)Create the rest of the JSPs.
No comments:
Post a Comment