Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frustrated with Eclipse !!!

 
G Par
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
eclipse error.jpg
[Thumbnail for eclipse error.jpg]
 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic