This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I want to create a struts 2 project in eclipse. I have downloaded the latest struts distribution. But things always become confusing when i try to create a struts project in ECLIPSE. Whenever I create a dynamic web project and add struts libraries to that project, some error or the other pops up.
How do I properly setup an eclipse Struts 2 project ?
To get a simple Hello world page, I did:
1. created a dynamic web project (procollab)
2. added struts 2 jars inside WEB-INF/lib
3. added the same libraries inside project build path
4. set the output folder for the src in WEB-INF/classes
5. created a filter in web.xml to send all requests to org.apache.struts2.dispatcher.FilterDispatcher
6. created a struts.xml in src
I have added the project procollab in tomcat server list also in eclipse. but when I access any static resource directly, I get the page. I have the helloworld.jsp in webcontent folder, and when I go to http:localhost:8080/procollab/helloworld.jsp, I get the page correctly.
Have I set up my environment correctly ? Please help