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 libraries. These includes will be use to access the tags of struts. In your case we only need the logic tag library.



Global Action Forwards and Action Mappings>>>



Create struts2 HelloWorld Application>>>

No comments:

Post a Comment