You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Myers <am...@gmail.com> on 2008/06/02 09:17:11 UTC

Struts 2 / Eclipse

Hi,

I've used Struts in the past but have spent a few years working with
other technologies.

I would like to come back to Struts again however and thought I'd look
at Struts 2.

I was hoping to set up a project in Eclipse however I'm struggling
with it.  I found this article in the archives, dated October 2006 -
http://www.nabble.com/Struts2-runs-in-Eclipse-td6981946.html#a6981946
- however I haven't found it answers all my questions.

I have managed to create a project as suggested, however I have no
idea now how to Run it.  I was hoping to be able to right click on the
project and select "Run on Server" but that doesn't seem to be an
option.

Can anyone please share with me their secrets as to how to easily
start up a Struts 2 project in Eclipse?

Many thanks,
Andrew.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Re: Struts 2 / Eclipse

Posted by Andrew Myers <am...@gmail.com>.
Thanks to Musachy I have got this going now.

For anyone else interested reference there was one additional step I 
needed after the instructions below, and that was to right click the 
project in Eclipse, then select Properties and in J2EE Module 
Dependencies put a checkbox next to "Maven Dependencies".  Now I can use 
maven and run my struts 2 project under tomcat with WTP

Musachy Barroso wrote:
> I always use maven and it is quite easy:
>
> http://struts.apache.org/2.1.2/docs/struts-maven-archetypes.html
>
> after you have your blank project created, just do a :
>
> mvn eclipse:eclipse -Dwtpversion=1.5
>
> in the project directory and import the generated project into
> eclipse. After that, just run it using WTP as usual.
>
> musachy


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 / Eclipse

Posted by Musachy Barroso <mu...@gmail.com>.
I always use maven and it is quite easy:

http://struts.apache.org/2.1.2/docs/struts-maven-archetypes.html

after you have your blank project created, just do a :

mvn eclipse:eclipse -Dwtpversion=1.5

in the project directory and import the generated project into
eclipse. After that, just run it using WTP as usual.

musachy

On Mon, Jun 2, 2008 at 3:17 AM, Andrew Myers <am...@gmail.com> wrote:
> Hi,
>
> I've used Struts in the past but have spent a few years working with
> other technologies.
>
> I would like to come back to Struts again however and thought I'd look
> at Struts 2.
>
> I was hoping to set up a project in Eclipse however I'm struggling
> with it.  I found this article in the archives, dated October 2006 -
> http://www.nabble.com/Struts2-runs-in-Eclipse-td6981946.html#a6981946
> - however I haven't found it answers all my questions.
>
> I have managed to create a project as suggested, however I have no
> idea now how to Run it.  I was hoping to be able to right click on the
> project and select "Run on Server" but that doesn't seem to be an
> option.
>
> Can anyone please share with me their secrets as to how to easily
> start up a Struts 2 project in Eclipse?
>
> Many thanks,
> Andrew.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 2 / Eclipse

Posted by Martin Gainty <mg...@hotmail.com>.
download tomcat-plugin from
http://www.eclipsetotale.com/tomcatPlugin.html

setup tomcat in eclipse (assume $ECLIPSE_HOME is the folder where eclipse was unzipped)
unzip the zip file to $ECLIPSE_HOME/plugins folder

from eclipse folder
java -jar startup.jar -clean
Window/Preferences/Tomcat Manager App
supply the required parameters of tomcat-home tomcat-version and context-declaration-mode  Server.xml

setup the tomcat-plugin manager app to execute on port which is not previously bound e.g.
http://localhost:8081/manager

feel free to ping me offline for any details

HTH
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Mon, 2 Jun 2008 04:56:27 -0700
> From: newton.dave@yahoo.com
> Subject: Re: Struts 2 / Eclipse
> To: user@struts.apache.org
> 
> It's no different than with any other Java server app.
> 
> You might have more luck checking Eclipse forums/lists for specific info; I don't know of any particular issues with an S2 app.
> 
> Dave
> 
> --- On Mon, 6/2/08, Andrew Myers <am...@gmail.com> wrote:
> 
> > From: Andrew Myers <am...@gmail.com>
> > Subject: Struts 2 / Eclipse
> > To: user@struts.apache.org
> > Date: Monday, June 2, 2008, 3:17 AM
> > Hi,
> > 
> > I've used Struts in the past but have spent a few years
> > working with
> > other technologies.
> > 
> > I would like to come back to Struts again however and
> > thought I'd look
> > at Struts 2.
> > 
> > I was hoping to set up a project in Eclipse however I'm
> > struggling
> > with it.  I found this article in the archives, dated
> > October 2006 -
> > http://www.nabble.com/Struts2-runs-in-Eclipse-td6981946.html#a6981946
> > - however I haven't found it answers all my questions.
> > 
> > I have managed to create a project as suggested, however I
> > have no
> > idea now how to Run it.  I was hoping to be able to right
> > click on the
> > project and select "Run on Server" but that
> > doesn't seem to be an
> > option.
> > 
> > Can anyone please share with me their secrets as to how to
> > easily
> > start up a Struts 2 project in Eclipse?
> > 
> > Many thanks,
> > Andrew.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Keep your kids safer online with Windows Live Family Safety.
http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008

Aw: Struts 2 / Eclipse

Posted by ki...@arcor.de.
Hi Andrew,

I had the same problem some weeks ago and did it the following way:

I prefer to use the Sysdeo Eclipse Tomcat Launcher plugin (http://www.eclipsetotale.com/tomcatPlugin.html). This gives you integrated Tomcat start/stop functionality and also adds a "Tomcat project" which gives you the basic infrastructure of a web app.
Then I copy the files from a working Struts (2) application into this project. The Struts blank application is a good (and minimal) choice. With this you do have the basics of a Struts based web app in an Eclipse project.
You will have to do some tuning (e. g. add the libraries which you copied to WEB-INF/lib to your build path, adapt the package structure, ...). I had a bit to fight with the Struts Blank app packages but renaming them helped.

If you are interested I can send you a zipped minimal project generated this way. It should work even if you are not using the plugin. In that case you probably have to add the servlet jars manually to the project.

Martin


----- Original Nachricht ----

> From: Andrew Myers <am...@gmail.com>
> Subject: Struts 2 / Eclipse
> To: user@struts.apache.org
> Date: Monday, June 2, 2008, 3:17 AM
> Hi,
> 
> I've used Struts in the past but have spent a few years
> working with
> other technologies.
> 
> I would like to come back to Struts again however and
> thought I'd look
> at Struts 2.
> 
> I was hoping to set up a project in Eclipse however I'm
> struggling
> with it.  I found this article in the archives, dated
> October 2006 -
> http://www.nabble.com/Struts2-runs-in-Eclipse-td6981946.html#a6981946
> - however I haven't found it answers all my questions.
> 
> I have managed to create a project as suggested, however I
> have no
> idea now how to Run it.  I was hoping to be able to right
> click on the
> project and select "Run on Server" but that
> doesn't seem to be an
> option.
> 
> Can anyone please share with me their secrets as to how to
> easily
> start up a Struts 2 project in Eclipse?
> 
> Many thanks,
> Andrew.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 / Eclipse

Posted by Dave Newton <ne...@yahoo.com>.
It's no different than with any other Java server app.

You might have more luck checking Eclipse forums/lists for specific info; I don't know of any particular issues with an S2 app.

Dave

--- On Mon, 6/2/08, Andrew Myers <am...@gmail.com> wrote:

> From: Andrew Myers <am...@gmail.com>
> Subject: Struts 2 / Eclipse
> To: user@struts.apache.org
> Date: Monday, June 2, 2008, 3:17 AM
> Hi,
> 
> I've used Struts in the past but have spent a few years
> working with
> other technologies.
> 
> I would like to come back to Struts again however and
> thought I'd look
> at Struts 2.
> 
> I was hoping to set up a project in Eclipse however I'm
> struggling
> with it.  I found this article in the archives, dated
> October 2006 -
> http://www.nabble.com/Struts2-runs-in-Eclipse-td6981946.html#a6981946
> - however I haven't found it answers all my questions.
> 
> I have managed to create a project as suggested, however I
> have no
> idea now how to Run it.  I was hoping to be able to right
> click on the
> project and select "Run on Server" but that
> doesn't seem to be an
> option.
> 
> Can anyone please share with me their secrets as to how to
> easily
> start up a Struts 2 project in Eclipse?
> 
> Many thanks,
> Andrew.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org