File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Frustrated with Eclipse !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Frustrated with Eclipse !!!" Watch "Frustrated with Eclipse !!!" New topic

Frustrated with Eclipse !!!

G Par

Joined: Jul 11, 2011
Posts: 9
After spending hours I am not able to get this simple Hello World program in Struts 2 to work in Eclipse. But I have been able to get it to work in Netbeans and without an IDE. So Eclipse is really testing my patience here. I think it is something related to setting classpaths in eclipse but just can't figure it out. I don't know why it is so non-intutive in eclipse when it was a piece of cake in NB.
Appreciate any help.

The screenshot of eclipse runtime path is below.

The Web.xml is as follows

The struts.xml is as follows

Action is simple as follows

So basically it should have invoked the action MessageAction (which it does beautifully in NB and without IDE)

But in eclipse I get the below error I get the below error.

[Thumbnail for eclipse error.jpg]

Sumit Bisht
Ranch Hand

Joined: Jul 02, 2008
Posts: 331

You need webserver.jar in your classpath.
Please use servers>tomcat to edit your server's classpath(I am assuming your tomcat is running via standard WTP plugins).
If not, you can always tweak at preference menus to adjust tomcat's classpath.
G Par

Joined: Jul 11, 2011
Posts: 9
Thanks for your reply. I included webserver.jar but the same error persists. I am not sure I understand where exactly you suggested setting classpath in my eclipse helios.
I have set the clsspath via Run>RunConfigurations>Tomcat 7.0>Classpath Tab as shown in the diagram. I hope this is correct. Please advice what I am missing.
I agree. Here's the link:
subject: Frustrated with Eclipse !!!
jQuery in Action, 3rd edition