|
The following archived MyEclipse Web Projects provide the examples referenced in the Struts 2 In Action book.
- Chapter 2, Section 2.2 - Hello World Example
- Chapter 3, Section 3.2 - Portfolio Example Using Java Bean Properties
- Chapter 3, Section 3.4.1 - Portfolio Example Using Object Backed Method
- Chapter 3, Section 3.4.2 - Portfolio Example Using Model Driven Method
- Chapter 4, Section 4.5.2 - Login Interceptor
- Chapter 5, Sections 5.3 - 5.4 - Type Convertors
- Chapter 6, Sections 6.3 - 6.6 - View and Control Tags
- Chapter 7, Section 7.3 - User Interface Component Tags
- Chapter 8, Sections 8.1 - 8.4 - Results, AJAX, Forward To Servlet
- Chapter 10, Sections 10.2 - 10.4 - Validation Framework
To load one of the above examples into your MyEclipse workspace do the following
- Download and save the zip file to your computer
- In your MyEclipse workspace go to File Import - Existing Project Into Workspace (under general) - click next
- Click the radio button for Select Archive File and then browse to where you saved the zip file in step 1
- You should see the project name and then click on Finish
Now you can add the web project to run under your MyEclipse Tomcat server by following these steps
- Under Run - select Open run dialog
- Right click on the MyEclipse Server Application and select New
- Type in the run configuration name (I usually use the project name)
- In the project drop down select the project
- In the server drop down select MyEclipse Tomcat
- Select Apply and Run
MyEclipse will deploy the project to the MyEclipse tomcat webapps folder, start up tomcat, and launch the index.jsp page (which for the above example projects just forwards to the correct start page). In the future when you want to run the project, just click on the drop down arrow next to the run icon (the green circle with an arrow) and click on the name you gave the run configuration in step 3 above (usually the project name).
|