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.
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.
Joined: Jul 11, 2011
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.