Re: Configuring Struts with eclipse

2007-07-12 Thread cilquirm

It's relatively easy.

You want the WTP  ( unless you're using some customized version like
MyEclipse, at which point, I can't help ).

a) Create a Dynamic Web Project.
b) Set up your Server Runtime (1) (2)
c) Drop your jars into WebResources/WEB-INF/lib  (3)(4)
4) write up your struts.xml :

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 2.0//EN;
constant name=struts.devMode value=true/
constant name=struts.enable.SlashesInActionNames value=true/
constant name=struts.mapper.alwaysSelectFullNamespace value=false/
constant name=struts.ui.theme value=xhtml/
constant name=struts.objectFactory value=guice/
constant name=struts.action.extension value=action,ajaxaction/

include file=struts-default.xml/

5) set up your web.xml :

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4




6) happy coding.


(1) if you're using Eclipse Europa 3.3, you can use the J2EE preview to run
an embedded version of jetty so you don't even need an external runtime.
(2) certain servers, like glassfish and geronimo, can actually be installed
directly from this setup screen.
(3) at the very least you'll need the struts2-core, ognl, commons-logging,
(4) fwiw, I like to use the codebehind plugin ( or at your leisure, use the
smarturls plugin )

umeshawasthi wrote:
 HI All,
 Can any body tell me how can i configure Struts in Eclipse i am using
 Eclipse 3.2.2 .How can i start a struts project in the Eclipse.Any help
 will be much appriciated.
 --umesh :(

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Configuring Struts with eclipse

2007-07-12 Thread Ted Husted

On 7/12/07, cilquirm [EMAIL PROTECTED] wrote:

  constant name=struts.devMode value=true/

We now strongly recommend that developers only turn devMode on for a
reason, and always temporarily. There have been problems with people
forgetting to turn devMode back off in production, which can cause a
serious performance drag.

c) Drop your jars into WebResources/WEB-INF/lib  (3)(4)

Another approach is to create a User Library with the Struts JARs,
which can then be shared between projects. Just be sure to also select
it under J2EE Module Dependencies.  In any event, do *not* select
plugin JARs that you do not need, since that may trigger Struts to log
warnings about missing dependencies.

One other Eclipse note is that if you create the project over existing
content, you may need to create a new JSP before Eclipse finds the TLD

The most important thing (and I spent a whole day learning this!) is
to go with the flow. WTP has its  own opinion on file organization,
and to get the full benefit of the tools, play along (don't sweat the
small stuff!).

HTH, Ted.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]