Skip to main content

Posts

Showing posts with the label Create Struts2 Project

Create Struts2 project Using NetBeans

If you decide to start learning and using struts2, probably one of the first things you think about is which IDE to use, and what you need in order to create and run a Struts2 project... If you search the web , you'll find many tutorials on how to create a struts2 project, and start developing. This is what I did when I was starting, and soon find out that nothing I found on the web worked for me in proper manner... So, I decided to create a small tutorial on how to create an empty struts2 project , in order to help others, and save their time. Not to teach you Struts2, but to help you create a working Struts2 project! Ok, I will use NetBeans 6.5, and a Tomcat 6 that comes with it... First of all, go to http://struts.apache.org/2.x/index.html and download the latest version of Struts2. I downloaded struts-2.1.6-all.zip You won't be needing all the libraries in it. Just 6 of them. Because of this, you can download essential dependencies only. When you download one...

Create Struts2 Project Using MyEclipse

Create a struts project Create a new struts project with File > New > Project or use the shortcut Strg + n. Select the Wizard in J2EE Web Project Create a nice name for your project After creating the project , your Package Explorer looks like the picture below. For now your project is a normal J2EE project , so we need to add the struts capabilityies. Right click on the project and add the capabilityies for struts with Add Struts Capabilityies. Change the properties Base package for new classes and Default application resource Create a default welcome page Ok, now we want to create a default page. Right click (yes again) on the Folder WebRoot in the Project and choose New > JSP. Set the name to index.jsp and choose on template to use > Standard JSP using Struts 1.1 MyEcplise will use the template to create the JSP File. You will find the file index.jsp in the folder WebRoot of the project . On the top of the file you will find the struts tag l...