Re: Struts + Maven + Eclipse problem

2008-02-13 Thread Randy Burgess
Have you run "mvn eclipse:eclipse" in the project directory? Have you set
the web root for the project in Eclipse? I had to do both when creating a
Struts Maven project from the command line. This structure sounds like the
project that is created from the following which was discussed on the list
not long ago.

mvn archetype:create -DgroupId=com.s2.anu -DartifactId=s2proj
-DarchetypeGroupId=org.apache.struts-DarchetypeArtifactId=struts2-archetype-
starter
-DarchetypeVersion=
2.0.11 -DremoteRepositories=
http://people.apache.org/builds/struts/m2-staging-repository

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Gaurav Arora <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Tue, 12 Feb 2008 21:21:53 +0530
> To: Struts Users Mailing List 
> Subject: Struts + Maven + Eclipse problem
> 
> I created a new struts project using the maven archetype and then
> imported it into eclipse. However when I try to run this project on
> tomcat (through eclipse) i keep getting the following error :
> 
> Feb 12, 2008 9:15:00 PM org.apache.struts2.dispatcher.Dispatcher serviceAction
> SEVERE: Could not find action or result
> There is no Action mapped for namespace / and action name index. -
> [unknown location]
> at 
> 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186>
)
> at 
> org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActio
> nProxyFactory.java:41)
> at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
> at 
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:
> 419)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:215)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:188)
> at 
> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:1
> 18)
> at 
> 
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52>
)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:215)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:188)
> at 
> org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextClean
> Up.java:99)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:215)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:188)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
> :213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
> :174)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:1
> 08)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
> at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processCon
> nection(Http11BaseProtocol.java:665)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
> 528)
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWork
> erThread.java:81)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:
> 689)
> at java.lang.Thread.run(Thread.java:619)
> 
> My struts.xml is as follows :
> 
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
> "http://struts.apache.org/dtds/struts-2.0.dtd";>
> 
> 
> 
> 
> /jsp/index.jsp
> 
> 
> /jsp/index.jsp
> /jsp/helloWorld.jsp
> 
> 
> 
> 
> 
> I tried all combinations for the "name" attribute of the package tag
> but it doesn't work. Is there an easier way to do this? Also, how can
> I build my struts project using eclipse instead of maven?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



Re: [OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Wes Wannemacher
I use maven + struts + eclipse + tomcat as my primary dev environment.
After having maven create the archetype, you should also go into the
project directory and do 'mvn eclipse:eclipse -Dwtpversion=1.5' This
will create .project and a few other files that will help eclipse do
what it needs to do. Also, you have to setup a variable called
M2_REPO. If you look at eclipse's 'Build Path' setting for your
project, you'll likely see a bunch of references to it, but if it's
undefined, none of the jars will be found. It should be pretty easy to
figure out where to have M2_REPO point by looking at the entries for
Build Path.

On 2/12/08, Gaurav Arora <[EMAIL PROTECTED]> wrote:
> The application works when I make a war and deploy it in tomcat but
> not when I try to run tomcat from eclipse directly. It's obvious that
> the problem has something to do with eclipse, so you're right, this
> probably isn't the forum for it.
>
> But i'm still wondering if people still use the Eclipse + Maven +
> Struts + Tomcat combo and if so, how they go about managing their
> projects.
>
>
> On Feb 12, 2008 10:39 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > Tried to put a namespace="/" attribute in package tag, that didn't
> > > work. Where do I find the config-browser plugin?
> >
> > It's a standard S2 plugin shipped with the distro.
> >
> > > Yeah, I get an error when I access
> > > http://localhost:8080/application/index.action. The struts.xml file is
> > > in the classes directory.
> >
> > Is it deployed properly? Have you turned logging all the way up? Is devMode
> > turned on? Is there anything in the logs?
> >
> > > As for the eclipse build, I changed the default output directory to
> > > "bin" but eclipse still won't build my application.
> >
> > If you're running the app within Eclipse using its app server the output
> > directory should be /WEB-INF/classes. If you're using some sort of 
> > deployment
> > mechanism then it doesn't matter as long as you have it configured properly.
> >
> > "Eclipse still won't build my application" is not enough information with
> > which to provide a diagnosis, even if this *was* the correct forum for your
> > IDE issues, which it isn't.
> >
> > Did you put the required libraries in /WEB-INF/lib? Did you configure the
> > project properties to make sure the libraries are being included?
> >
> > Dave
> >
> > > On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > > > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > > > 
> > > > >   
> > > > >   
> > > > >   /jsp/index.jsp
> > > > >   
> > > > >   
> > > > >   /jsp/index.jsp
> > > > >   /jsp/helloWorld.jsp
> > > > >   
> > > > >   
> > > > > 
> > > >
> > > > What happens if you put a namespace="/" attribute in your 
> > > > element? What does the config-browser plugin show? You get the exception
> > > when
> > > > accessing /index.action?
> > > >
> > > > > how can I build my struts project using eclipse instead of maven?
> > > >
> > > > By putting the required S2 libraries (and whatever else you need) in 
> > > > your
> > > > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> > > application
> > > > build. There are a couple Maven plugins for Eclipse that help with
> > > dependency
> > > > management, but I'm not sure how they deal with packaging etc.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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



Re: [OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
The application works when I make a war and deploy it in tomcat but
not when I try to run tomcat from eclipse directly. It's obvious that
the problem has something to do with eclipse, so you're right, this
probably isn't the forum for it.

But i'm still wondering if people still use the Eclipse + Maven +
Struts + Tomcat combo and if so, how they go about managing their
projects.


On Feb 12, 2008 10:39 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > Tried to put a namespace="/" attribute in package tag, that didn't
> > work. Where do I find the config-browser plugin?
>
> It's a standard S2 plugin shipped with the distro.
>
> > Yeah, I get an error when I access
> > http://localhost:8080/application/index.action. The struts.xml file is
> > in the classes directory.
>
> Is it deployed properly? Have you turned logging all the way up? Is devMode
> turned on? Is there anything in the logs?
>
> > As for the eclipse build, I changed the default output directory to
> > "bin" but eclipse still won't build my application.
>
> If you're running the app within Eclipse using its app server the output
> directory should be /WEB-INF/classes. If you're using some sort of deployment
> mechanism then it doesn't matter as long as you have it configured properly.
>
> "Eclipse still won't build my application" is not enough information with
> which to provide a diagnosis, even if this *was* the correct forum for your
> IDE issues, which it isn't.
>
> Did you put the required libraries in /WEB-INF/lib? Did you configure the
> project properties to make sure the libraries are being included?
>
> Dave
>
> > On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > > 
> > > >   
> > > >   
> > > >   /jsp/index.jsp
> > > >   
> > > >   
> > > >   /jsp/index.jsp
> > > >   /jsp/helloWorld.jsp
> > > >   
> > > >   
> > > > 
> > >
> > > What happens if you put a namespace="/" attribute in your 
> > > element? What does the config-browser plugin show? You get the exception
> > when
> > > accessing /index.action?
> > >
> > > > how can I build my struts project using eclipse instead of maven?
> > >
> > > By putting the required S2 libraries (and whatever else you need) in your
> > > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> > application
> > > build. There are a couple Maven plugins for Eclipse that help with
> > dependency
> > > management, but I'm not sure how they deal with packaging etc.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



[OT] Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Dave Newton
--- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> Tried to put a namespace="/" attribute in package tag, that didn't
> work. Where do I find the config-browser plugin?

It's a standard S2 plugin shipped with the distro.

> Yeah, I get an error when I access
> http://localhost:8080/application/index.action. The struts.xml file is
> in the classes directory.

Is it deployed properly? Have you turned logging all the way up? Is devMode
turned on? Is there anything in the logs?

> As for the eclipse build, I changed the default output directory to
> "bin" but eclipse still won't build my application.

If you're running the app within Eclipse using its app server the output
directory should be /WEB-INF/classes. If you're using some sort of deployment
mechanism then it doesn't matter as long as you have it configured properly.

"Eclipse still won't build my application" is not enough information with
which to provide a diagnosis, even if this *was* the correct forum for your
IDE issues, which it isn't.

Did you put the required libraries in /WEB-INF/lib? Did you configure the
project properties to make sure the libraries are being included?

Dave

> On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > > 
> > >   
> > >   
> > >   /jsp/index.jsp
> > >   
> > >   
> > >   /jsp/index.jsp
> > >   /jsp/helloWorld.jsp
> > >   
> > >   
> > > 
> >
> > What happens if you put a namespace="/" attribute in your 
> > element? What does the config-browser plugin show? You get the exception
> when
> > accessing /index.action?
> >
> > > how can I build my struts project using eclipse instead of maven?
> >
> > By putting the required S2 libraries (and whatever else you need) in your
> > /WEB-INF/lib directory and setting up Eclipse to do a normal web
> application
> > build. There are a couple Maven plugins for Eclipse that help with
> dependency
> > management, but I'm not sure how they deal with packaging etc.


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



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
Tried to put a namespace="/" attribute in package tag, that didn't
work. Where do I find the config-browser plugin?

Yeah, I get an error when I access
http://localhost:8080/application/index.action. The struts.xml file is
in the classes directory.

As for the eclipse build, I changed the default output directory to
"bin" but eclipse still won't build my application.

On Feb 12, 2008 9:40 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> > 
> >   
> >   
> >   /jsp/index.jsp
> >   
> >   
> >   /jsp/index.jsp
> >   /jsp/helloWorld.jsp
> >   
> >   
> > 
>
> What happens if you put a namespace="/" attribute in your 
> element? What does the config-browser plugin show? You get the exception when
> accessing /index.action?
>
> > how can I build my struts project using eclipse instead of maven?
>
> By putting the required S2 libraries (and whatever else you need) in your
> /WEB-INF/lib directory and setting up Eclipse to do a normal web application
> build. There are a couple Maven plugins for Eclipse that help with dependency
> management, but I'm not sure how they deal with packaging etc.
>
> Dave
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Dave Newton
--- Gaurav Arora <[EMAIL PROTECTED]> wrote:
> 
>   
>   
>   /jsp/index.jsp
>   
>   
>   /jsp/index.jsp
>   /jsp/helloWorld.jsp
>   
>   
> 

What happens if you put a namespace="/" attribute in your 
element? What does the config-browser plugin show? You get the exception when
accessing /index.action?

> how can I build my struts project using eclipse instead of maven?

By putting the required S2 libraries (and whatever else you need) in your
/WEB-INF/lib directory and setting up Eclipse to do a normal web application
build. There are a couple Maven plugins for Eclipse that help with dependency
management, but I'm not sure how they deal with packaging etc.

Dave


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



Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Lukasz Lenart
Set package namespace to "/"




Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Struts + Maven + Eclipse problem

2008-02-12 Thread Gaurav Arora
I created a new struts project using the maven archetype and then
imported it into eclipse. However when I try to run this project on
tomcat (through eclipse) i keep getting the following error :

Feb 12, 2008 9:15:00 PM org.apache.struts2.dispatcher.Dispatcher serviceAction
SEVERE: Could not find action or result
There is no Action mapped for namespace / and action name index. -
[unknown location]
at 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
at 
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
at 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at 
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)

My struts.xml is as follows :


http://struts.apache.org/dtds/struts-2.0.dtd";>




/jsp/index.jsp


/jsp/index.jsp
/jsp/helloWorld.jsp





I tried all combinations for the "name" attribute of the package tag
but it doesn't work. Is there an easier way to do this? Also, how can
I build my struts project using eclipse instead of maven?

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