wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 2 -Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 -Eclipse" Watch "Struts 2 -Eclipse" New topic
Author

Struts 2 -Eclipse

Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
I want to know how to run struts 2 aplication in eclipse???

please help me on this
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just make sure your Eclipse installation has the Web Tools Platform (WTP) plugin installed. Then import the struts2-blank-2.0.11.war file that comes with the download (file->import->war file). This creates a Struts 2 web project for you in Eclipse. For more information on Struts and Eclipse, see the appropriate question in this forum's FAQ.
[ November 20, 2007: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
Thank you very much for the reply.......
I import the blank war file and try to run simple application which only display message. When I run it on server it display the index.html page and when I click the link to display my jsp "HTTP Status 404 - There is no Action mapped for action name HelloWorld." Error displayed.

I've run this application successfully not using eclipse. (place blank.war in tomcat webapp directory). I wonder what happened in here...

Is this because the folder structure???
please be kind enough to help me.

Thank you
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
What version of Eclipse are you using? Do you have the WTP plugin installed? Have you configured a server within WTP? If so, which server did you configure?

I have Eclipse 3.3 with WTP Installed and a Tomcat 6 server configured. When I import the blank war file to a project and then deploy it to the server, it works fine.
Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
Thanks again...........

I tried it againg and again....finally it works.............!!!

Thanks for your kind reply.....

Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
hey again..........

If I'm not disturbing you please help me on this also...
I tried to connect access database and it didn't work!!

pleae tell me have I made any mistakes here??
(My database is harshani, table: employee, DSN hsw). When I run this it displays the jsp page but after insert values it generate exception and my database is not updating...

Harshani Wickramarathna
Greenhorn

Joined: Nov 15, 2007
Posts: 28
my database is working!!!

I don't know how this is happening!! I tried several times and failed to run my application but whenever I post my problem here I found that my page is working!!!

I'm posting this because if I'm not do so you may waste your valueble time on reading my problem.

Thank you.......
Jim Patrick
Ranch Hand

Joined: Dec 27, 2005
Posts: 42

Hi

how to configure a server within WTP?..btw, i am using apache-tomcat-5.5.26 and installed sysdeo tomcat plugin in eclipse europa..

-jim.


Originally posted by Merrill Higginson:
What version of Eclipse are you using? Do you have the WTP plugin installed? Have you configured a server within WTP? If so, which server did you configure?

I have Eclipse 3.3 with WTP Installed and a Tomcat 6 server configured. When I import the blank war file to a project and then deploy it to the server, it works fine.

[ March 31, 2008: Message edited by: Jim Patrick ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm not sure why this is happening, but I will say that with Eclipse 3.3 and WTP, you really don't need tools like the sysdeo plugin, and in fact are better off without them.

Regarding how to set up a server, just read the help documentation. Select help-->Table of Contents. Then expand the topic Web Application Development Guide and read all of the subtopic Using the Server tools.
Jim Patrick
Ranch Hand

Joined: Dec 27, 2005
Posts: 42

Originally posted by Merrill Higginson:
What version of Eclipse are you using? Do you have the WTP plugin installed? Have you configured a server within WTP? If so, which server did you configure?


I am using Eclipse Europa..do we have to install the WTP Plugin separately? i mean..isn't it there by default in the plug-in's? and how do i know if the WTP plugin is installed/not ? because in the Help>About Eclipse Platform>Plug-in details, it doesnt show the plugin with name "WTP Plug-in". It has these plugins==>
WTP UI Plug-in,WTP EJB UI Plug-in,WTP J2EE UI Plug-in,WTP JCA UI Plug-in,WTP Servlet UI Plug-in and WTP Webservice UI Plug-in.


thanks,
Jim.
[ April 02, 2008: Message edited by: Jim Patrick ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If, when you downloaded Eclipse Euoropa, you selected the option Eclipse IDE for Java EE Developers, then the WTP plugin was installed automatically when you downloaded Eclipse.

When you select Help->About Eclipse from the menu, and select Feature Details, you will see a number of features starting with "J2EE Standard tools.." and "Web Standard tools..". These features are all part of the WTP project. You used to have to install the WTP separately, but with Europa, it's part of the J2EE Developer download.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 -Eclipse