Skip to main content

Posts

Showing posts from November, 2012

Creating a Struts-2 hello world application on eclipse

Hi, This is a getting started tutorial for struts-2. Struts-2 is similar to struts-1 but there are certain changes in terms of functionality and syntax. The main components needed to create the demo application are as follows: 1. Eclipse indigo. 2. Struts-2 distribution:- To download struts-2 distribution go to 'http://struts.apache.org/download.cgi#struts238-SNAPSHOT' and download 'Full Distribution: struts-2.3.7-all.zip (76mb) [ PGP ] [ MD5 ] ' 3. Tomcat 7. That is all you need to create a struts application. Application Structure: The demo application that we are going to create using struts-2 is a login application. The application will be having following components: 1. index.jsp 2. HelloWorld.jsp 3. error.jsp 4. HelloWorldAction.java Now the application proceeds as follows: 1. When the application starts the user is presented with 'index.jsp' where the user enters username and password. 2. On submitting the 'index.jsp' page