开发者

struts 2 simple helloworld example with eclipse

开发者 https://www.devze.com 2023-03-27 01:03 出处:网络
I tried lot of exmaples in net. But still i\'m unable to run a simple helloworld program using 开发者_Go百科struts 2 . Whenever i\'m trying i\'m getting the \"resource not found error\" evn though if

I tried lot of exmaples in net. But still i'm unable to run a simple helloworld program using 开发者_Go百科struts 2 . Whenever i'm trying i'm getting the "resource not found error" evn though if i followed the steps correctly as per the example in the net. If any one can give me a step by step procedure surly it will a great help for me!


If you are familiar with Maven 2 then you can use Struts2 architype-basic it will create and setup a hello world struts2 application. this will work.


I have posted several times for this problem, best way to start learning any framework is to try there hands around the example applications being distrusted along with the framework.

Struts2 is not an exception in this.Just download sample applications from there official download page and run in your tomcat

It will not only give you a running example but also will help you to understand how they have packed there application what resources is going at what places,what are the required dependencies and what other configurations one need to run an application

Struts2 Sample Application Download

Download sample applications from here and you will get struts2-blank-x.x.x war file which is a standard struts2 structure with running hello world application

Regarding maven its a best way to create a standard application structure to start with but if you are not familiar with maven than my best suggestion is to put time to learn Struts2 at the moment and maven can be captured along the way


This might be taken as a terrible travesty to some but...

I wrote out this perfectly good and quite detailed description to take someone by the hand and walk though though doing just this with netbeans, found here: Struts2 & NetBeans 7

Download the Java EE version of netbeans: http://netbeans.org/downloads/ follow my tutorial.

Now to defend why this isn't a travesty, both IDE's being what they are (which is great btw), you should now be able to go back to Eclipse and get struts2 going. That is to say the issue isn't the IDE, but the lack of a really gentle walk though for your particular IDE. In getting this working it would be great if you would detail all the steps as well as I did for netbeans, post a solution to this question and I would definitely upvote both your question and answer and I would point Eclipse users here!

PS: There is nothing wrong with using the demo application but a very specific walk though is better as new users to web programming with java EE generally have no idea what they are looking at.

0

精彩评论

暂无评论...
验证码 换一张
取 消