Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in Eclipse Struts 2 Project

 
lakshmanan anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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

Errors I get:

Http 404. I get this for any URL, for example http://localhost:8080 or http://localhost:8080/procollab

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
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this question is related to IDE.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What libraries are you deploying? What's your configuration look like?

You haven't really given much specific information: TellTheDetails.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic