Struts Basics

1.) Create a Form Class. This class must extend the org.apache.struts.action.ActionForm, the form class may just be fields with setters and getters.

2.) Create a Action Class ( the Controller ). This class must extend the org.apache.struts.action.* . Then override execute method where the request will be processed.

3.) In the struts-config.xml, define the Form Class and the Action Class here.

4.) In the web.xml file, define the org.apache.struts.action.ActionServlet and the struts-config.xml
struts-config.xml and web.xml should be in the same WEB-INF folder. Also iclude the “action” servlet mapping.

5.) Create the JSP page to render the web browser view.

See the details in this site:
http://www.mkyong.com/struts/struts-hello-world-example/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s