This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Error in Eclipse Struts 2 Project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in Eclipse Struts 2 Project" Watch "Error in Eclipse Struts 2 Project" New topic
Author

Error in Eclipse Struts 2 Project

lakshmanan anand
Greenhorn

Joined: Jan 13, 2009
Posts: 22


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

http://luckydev07.blogspot.com
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 791

I think this question is related to IDE.


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What libraries are you deploying? What's your configuration look like?

You haven't really given much specific information: TellTheDetails.
 
GeeCON Prague 2014
 
subject: Error in Eclipse Struts 2 Project