You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Karr, David" <da...@wamu.net> on 2008/03/05 23:48:17 UTC

Simple helloworld test fails with "Could not find action or result"

I'm sure I have a simple error here, but I don't see it.

I'm trying to construct a simple "hello, world" app with v2.0.11.  I
have an "index.jsp" that redirects to "main.action".  I started out with
the "main" action just having a result (name="success") going to
"/main.jsp".  That appears to work.  I then cloned the action (and
changing the name), adding a "class" attribute referring to a simple
Action class.  The Action class' execute method just returns SUCCESS.  I
would have thought this would do the same thing as the action without
the Action class, but it instead fails with "No result defined for
action com.wamu.struts.helloworld.MainAction and result success".

I'll attach my struts.xml, web.xml, and MainAction.java files.

Re: Simple helloworld test fails with "Could not find action or result"

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I'm intrigued because of the strange problems you were also having a few 
days ago.  Can you email me me your project as a zip?  (directly to the 
address below)
Don't include the libs, but make sure it's clear where they out to be.

You're deploying into tomcat 5.x right?

Karr, David wrote:
>> -----Original Message-----
>> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
>> Sent: Wednesday, March 05, 2008 4:53 PM
>> To: Struts Users Mailing List
>> Subject: Re: Simple helloworld test fails with "Could not 
>> find action or result"
>>
>>     


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


RE: Simple helloworld test fails with "Could not find action or result"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
> Sent: Wednesday, March 05, 2008 4:53 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action or result"
> 
> I can't see anything wrong.  My guess is still that it still 
> hasn't deployed correctly.
> 
> Time to use the source...  Put a breakpoint in your action 
> and trace what happens after you return "success".
> Immediately you'll have access to the ActionInvocation and 
> ActionConfig.  The latter will specify which results are 
> defined and their types.  You won't have to step far to find 
> out whether it found the result and whether the result had an error.

I see DefaultActionInvocation in the stack trace.  When it finally
fails, the following is the entire stack trace:

SEVERE: Could not find action or result
No result defined for action com.wamu.struts.helloworld.MainAction and
result success
	at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:350)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
	at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:221)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Vali
dationInterceptor.java:150)
	at
org.apache.struts2.interceptor.validation.AnnotationValidationIntercepto
r.doIntercept(AnnotationValidationInterceptor.java:48)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept
(ConversionErrorInterceptor.java:123)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:167)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercep
t(StaticParametersInterceptor.java:105)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInt
erceptor.java:83)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploa
dInterceptor.java:207)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Mod
elDrivenInterceptor.java:74)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.interce
pt(ScopedModelDrivenInterceptor.java:127)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(
ProfilingActivationInterceptor.java:107)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(
DebuggingInterceptor.java:206)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Chaini
ngInterceptor.java:115)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterc
eptor.java:143)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Prepa
reInterceptor.java:121)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInte
rceptor.java:123)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
	at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
04)
	at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
	at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContex
tCleanUp.java:99)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
	at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:595)
> 
> Karr, David wrote:
> >> -----Original Message-----
> >> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> >> Sent: Wednesday, March 05, 2008 3:11 PM
> >> To: Struts Users Mailing List
> >> Subject: Re: Simple helloworld test fails with "Could not 
> find action 
> >> or result"
> >>
> >> I don't see anything wrong with it, provided MainAction returns 
> >> "success" (MainAction.java wasn't attached).
> >>     
> >
> > Cute.  I guess my company decided that java is unsafe, so 
> they removed 
> > it from the attachments :) .  I'll reattach it with a fake extent.  
> > I'll also attach my JSP.  Perhaps that's relevant.
> >
> > The Action implementation extends ActionSupport, and it's using the 
> > SUCCESS constant.
> >
> >   
> >> Is it possible you have a conflicting struts.xml deployed in the 
> >> webapp, or any plugin jars deployed?  The only other time 
> I've seen 
> >> the response you're returning the correct result code is when the 
> >> Result implementation has encountered an error (not using the 
> >> CodeBehind plugin are you?)
> >>     
> >
> > I have the following jars in WEB-INF/lib:
> >
> > spring-context-2.0.5.jar
> > spring-core-2.0.5.jar
> > commons-logging-1.0.4.jar
> > spring-web-2.0.5.jar
> > freemarker-2.3.8.jar
> > struts2-core-2.0.11.jar
> > ognl-2.6.11.jar
> > struts2-spring-plugin-2.0.11.jar
> > spring-beans-2.0.5.jar
> > xwork-2.0.4.jar
> >
> > I do have the Spring plugin in there.  Could that be an issue?  I'm 
> > going to want to use that soon, but I'm not really using it yet.
> >
> > I tried exporting my WAR and verifying I only have my single 
> > struts.xml in it.
> >
> >   
> >> What happen if your go directly to /main.action and /main2.action?
> >>     
> >
> > That's what I've been doing.  When I go to "/main.action", 
> I get the 
> > error I described.
> >
> >   
> >> You have setup two actions:
> >>  main - implemented by MainAction, with a forward for "success" to 
> >> /main.jsp
> >>  main2 - implemented by ActionSupport, with a forward for 
> "success" 
> >> to /main.jsp and you're using the default interceptors.  It is 
> >> configured correctly.
> >>
> >> Karr, David wrote:
> >>     
> >>> I'm sure I have a simple error here, but I don't see it.
> >>>
> >>> I'm trying to construct a simple "hello, world" app with
> >>>       
> >> v2.0.11.  I
> >>     
> >>> have an "index.jsp" that redirects to "main.action".  I 
> started out 
> >>> with the "main" action just having a result
> >>>       
> >> (name="success") going to
> >>     
> >>> "/main.jsp".  That appears to work.  I then cloned the 
> action (and 
> >>> changing the name), adding a "class" attribute referring to
> >>>       
> >> a simple
> >>     
> >>> Action class.  The Action class' execute method just
> >>>       
> >> returns SUCCESS.  
> >>     
> >>> I would have thought this would do the same thing as the action 
> >>> without the Action class, but it instead fails with "No
> >>>       
> >> result defined
> >>     
> >>> for action com.wamu.struts.helloworld.MainAction and result
> >>>       
> >> success".
> >>     
> >>> I'll attach my struts.xml, web.xml, and MainAction.java files.
> >>>   
> >>>
> >>>       
> >> 
> ---------------------------------------------------------------------
> >> -
> >>     
> >>> --
> >>>
> >>>
> >>>       
> >> 
> ---------------------------------------------------------------------
> >>     
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>       
> >> 
> ---------------------------------------------------------------------
> >> -
> >>     
> >>> --
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG Free Edition. 
> >>> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 
> >>> 5/03/2008 6:38 PM
> >>>       
> >> 
> ---------------------------------------------------------------------
> >> 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
> > 
> ----------------------------------------------------------------------
> > --
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition. 
> > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 
> > 5/03/2008 6:38 PM
> >   
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Simple helloworld test fails with "Could not find action or result"

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I can't see anything wrong.  My guess is still that it still hasn't 
deployed correctly.

Time to use the source...  Put a breakpoint in your action and trace 
what happens after you return "success".
Immediately you'll have access to the ActionInvocation and 
ActionConfig.  The latter will specify which results are defined and 
their types.  You won't have to step far to find out whether it found 
the result and whether the result had an error.

Karr, David wrote:
>> -----Original Message-----
>> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
>> Sent: Wednesday, March 05, 2008 3:11 PM
>> To: Struts Users Mailing List
>> Subject: Re: Simple helloworld test fails with "Could not 
>> find action or result"
>>
>> I don't see anything wrong with it, provided MainAction 
>> returns "success" (MainAction.java wasn't attached).
>>     
>
> Cute.  I guess my company decided that java is unsafe, so they removed
> it from the attachments :) .  I'll reattach it with a fake extent.  I'll
> also attach my JSP.  Perhaps that's relevant.
>
> The Action implementation extends ActionSupport, and it's using the
> SUCCESS constant. 
>
>   
>> Is it possible you have a conflicting struts.xml deployed in 
>> the webapp, or any plugin jars deployed?  The only other time 
>> I've seen the response you're returning the correct result 
>> code is when the Result implementation has encountered an 
>> error (not using the CodeBehind plugin are you?)
>>     
>
> I have the following jars in WEB-INF/lib:
>
> spring-context-2.0.5.jar
> spring-core-2.0.5.jar
> commons-logging-1.0.4.jar
> spring-web-2.0.5.jar
> freemarker-2.3.8.jar
> struts2-core-2.0.11.jar
> ognl-2.6.11.jar
> struts2-spring-plugin-2.0.11.jar
> spring-beans-2.0.5.jar
> xwork-2.0.4.jar
>
> I do have the Spring plugin in there.  Could that be an issue?  I'm
> going to want to use that soon, but I'm not really using it yet.
>
> I tried exporting my WAR and verifying I only have my single struts.xml
> in it.
>
>   
>> What happen if your go directly to /main.action and /main2.action?
>>     
>
> That's what I've been doing.  When I go to "/main.action", I get the
> error I described.
>
>   
>> You have setup two actions:
>>  main - implemented by MainAction, with a forward for 
>> "success" to /main.jsp
>>  main2 - implemented by ActionSupport, with a forward for 
>> "success" to /main.jsp and you're using the default 
>> interceptors.  It is configured correctly.
>>
>> Karr, David wrote:
>>     
>>> I'm sure I have a simple error here, but I don't see it.
>>>
>>> I'm trying to construct a simple "hello, world" app with 
>>>       
>> v2.0.11.  I 
>>     
>>> have an "index.jsp" that redirects to "main.action".  I started out 
>>> with the "main" action just having a result 
>>>       
>> (name="success") going to 
>>     
>>> "/main.jsp".  That appears to work.  I then cloned the action (and 
>>> changing the name), adding a "class" attribute referring to 
>>>       
>> a simple 
>>     
>>> Action class.  The Action class' execute method just 
>>>       
>> returns SUCCESS.  
>>     
>>> I would have thought this would do the same thing as the action 
>>> without the Action class, but it instead fails with "No 
>>>       
>> result defined 
>>     
>>> for action com.wamu.struts.helloworld.MainAction and result 
>>>       
>> success".
>>     
>>> I'll attach my struts.xml, web.xml, and MainAction.java files.
>>>   
>>>
>>>       
>> ----------------------------------------------------------------------
>>     
>>> --
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>       
>> ----------------------------------------------------------------------
>>     
>>> --
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition. 
>>> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 
>>> 5/03/2008 6:38 PM
>>>       
>> ---------------------------------------------------------------------
>> 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
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 5/03/2008 6:38 PM
>   


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
--- "Karr, David" <da...@wamu.net> wrote:
> Changing the package name to "default" didn't seem to have an impact on
> the error.  I assume you meant to do that while not having the namespace
> attribute? 

Correct.

I'll try to duplicate your issue tomorrow; you can send me a copy as someone
else requested as well if you like, but I think your web.xml and struts.xml
will be enough to dupe it without any real effort.

Dave


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
Changing the package name to "default" didn't seem to have an impact on
the error.  I assume you meant to do that while not having the namespace
attribute? 

> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Wednesday, March 05, 2008 8:05 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> I'm still a little puzzled by this.
> 
> If you have a chance could you remove the namespace bit on 
> the package and see what the config-browser reports? I'm also 
> curious what happens if you change the name of the package to 
> "default".
> 
> Thanks,
> Dave
> 
> --- "Karr, David" <da...@wamu.net> wrote:
> 
> > > -----Original Message-----
> > > From: Wes Wannemacher [mailto:wesw@wantii.com]
> > > Sent: Wednesday, March 05, 2008 7:11 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > action orresult"
> > > 
> > > David,
> > > 
> > > This has been bugging me since my first response... 
> Although it may 
> > > not explain why it's not working, try adding 
> 'namespace="/"' to your 
> > > package declaration. I was reading through the docs, and I don't 
> > > think it indicates that it is necessary. But, just for 
> testing sake, 
> > > see if that fixes it.
> > 
> > Weird.  The good news is that fixes it.  Can someone tell me why?
> > Perhaps this is a good thing to write a validation for (that is, 
> > should the lack of a namespace attribute be an error?)?  
> The sort of 
> > bad news is that it just fails at a later point (I stepped 
> through the 
> > code and saw it pass by the previous point it was throwing an 
> > exception).  It now does this:
> > 
> > Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
> > internalGetPageContext
> > SEVERE: Exception initializing page context
> > java.lang.IllegalStateException: Cannot create a session after the 
> > response has been committed
> > 
> > I'm not including the entire stack trace, because after 
> googling this, 
> > I found the following internet-ancient reference to this:
> > 
> > http://www.mail-archive.com/user@struts.apache.org/msg54986.html
> > 
> > In short, once I turned off devmode, it worked.  I checked JIRA for 
> > issues involving devmode, and all of them appeared to be resolved.
> > 
> > In any case, I'm moving forward now.  Thanks for the help.
> > 
> > > 
> > > -Wes
> > > 
> > > On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > > > Oh, and if it helps, this is the output on my browser when
> > > executing
> > > > with "debug=xml":
> > > > 
> > > > <debug>
> > > > <parameters/>
> > > > <context>
> > > > <struts.actionMapping>
> > > > <class>class
> > > > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > > > <name>main</name>
> > > > <namespace>/</namespace>
> > > > </struts.actionMapping>
> > > > <attr/>
> > > > <report.conversion.errors>false</report.conversion.errors>
> > > > </context>
> > > > <request/>
> > > > <session/>
> > > > <valueStack>
> > > > <value>
> > > > <actionErrors/>
> > > > <actionMessages/>
> > > > <class>class com.wamu.struts.helloworld.MainAction</class>
> > > > <errorMessages/>
> > > > <errors/>
> > > > <fieldErrors/>
> > > > <locale>
> > > > <ISO3Country>USA</ISO3Country>
> > > > <ISO3Language>eng</ISO3Language>
> > > > <class>class java.util.Locale</class> <country>US</country> 
> > > > <displayCountry>United States</displayCountry> 
> > > > <displayLanguage>English</displayLanguage>
> > > > <displayName>English (United States)</displayName>
> > > <displayVariant/>
> > > > <language>en</language> <variant/> </locale> <tabs> <value> 
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>ABC</label>
> > > > <name>abc</name>
> > > > </value>
> > > > <value>
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>DEF</label>
> > > > <name>def</name>
> > > > </value>
> > > > </tabs>
> > > > </value>
> > > > <value>
> > > > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > > > </value>
> > > > </valueStack>
> > > > </debug>
> > > > 
> > > > > -----Original Message-----
> > > > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > Jeromy is correct
> > > > > At the very least we'll need to see the configuration
> > > files located
> > > > > in /WEB-INF such as
> > > > > 
> > > > > web.xml
> > > > > struts-xml
> > > > > struts-config.xml
> > > > > validation.xml
> > > > > web.xml
> > > > > struts-tags.xml
> > > > > validation.xml
> > > > > struts-tags.xml
> > > > > struts-actionchaining.xml
> > > > > struts-integration.xml
> > > > > struts-jsf.xml
> > > > > 
> > > > > These configuration files will give us of the
> > > layout/design you're
> > > > > using
> > > > > 
> > > > > Martin
> > > > > ----- Original Message -----
> > > > > From: "Karr, David" <da...@wamu.net>
> > > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > > > Subject: RE: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Simple helloworld test fails with "Could not
> > > > > find action
> > > > > > or result"
> > > > > >
> > > > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > > > 
> > > > > In my Eclipse project, it's at the root of my "src" 
> > > > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > > > If it wasn't found, I would be seeing more serious errors.
> > > > > 
> > > > > > In your struts.xml your action named "main2" has no class.
> > > > > 
> > > > > Take that back :) .
> > > > > 
> > > > > Yes, I know that.  That's the point.  "main2" has no
> > > Action class,
> > > > > but "main" does, and "main" fails for no obvious reason.
> > > > > 
> > > > > > can you post more of your code?
> > > > > 
> > > > > What else would you want to see?  There's really nothing else.
> > > > > 
> > > > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David
> > > <da...@wamu.net>
> > > > > > wrote:
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Jeromy Evans 
> > > > > > > > [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > > > To: Struts Users Mailing List
> > > > > > > > Subject: Re: Simple helloworld test fails with
> > > "Could not find
> > > > > > > > action or result"
> > > > > > > >
> > > > > > > > I don't see anything wrong with it, provided MainAction 
> > > > > > > > returns "success" (MainAction.java wasn't attached).
> > > > > > >
> > > > > > > Cute.  I guess my company decided that java is unsafe, so
> > > > > > they removed
> > > > > > > it from the attachments :) .  I'll reattach it with a
> > > fake extent.
> > > > > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > > > > >
> > > > > > > The Action implementation extends ActionSupport, and it's
> > > > > using the
> > > > > > > SUCCESS constant.
> > > > > > >
> > > > > > > > Is it possible you have a conflicting struts.xml
> > > > > deployed in the
> > > > > > > > webapp, or any plugin jars deployed?  The only 
> other time
> > > > > > I've seen
> > > > > > > > the response you're returning the correct result code
> > > > > is when the
> > > > > > > > Result implementation has encountered an error (not
> > > using the
> > > > > > > > CodeBehind plugin are you?)
> > > > > > >
> > > > > > > I have the following jars in WEB-INF/lib:
> > > > > > >
> > > > > > > spring-context-2.0.5.jar
> > > > > > > spring-core-2.0.5.jar
> > > > > > > commons-logging-1.0.4.jar
> > > > > > > spring-web-2.0.5.jar
> > > > > > > freemarker-2.3.8.jar
> > > > > > > struts2-core-2.0.11.jar
> > 
> === message truncated ===
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
Go to http://localhost:8080/YOUR_CONTEXT/config-browser/index.action


--- "Karr, David" <da...@wamu.net> wrote:

> How do you run the config-browser?  The wiki page has some info on it,
> but it's ambiguous.  I copied the jar into WEB-INF/lib and redeployed,
> but I'm not sure what to do now. 
> 
> > -----Original Message-----
> > From: Dave Newton [mailto:newton.dave@yahoo.com] 
> > Sent: Wednesday, March 05, 2008 8:05 PM
> > To: Struts Users Mailing List
> > Subject: RE: Simple helloworld test fails with "Could not 
> > find action orresult"
> > 
> > I'm still a little puzzled by this.
> > 
> > If you have a chance could you remove the namespace bit on 
> > the package and see what the config-browser reports? I'm also 
> > curious what happens if you change the name of the package to 
> > "default".
> > 
> > Thanks,
> > Dave
> > 
> > --- "Karr, David" <da...@wamu.net> wrote:
> > 
> > > > -----Original Message-----
> > > > From: Wes Wannemacher [mailto:wesw@wantii.com]
> > > > Sent: Wednesday, March 05, 2008 7:11 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > > action orresult"
> > > > 
> > > > David,
> > > > 
> > > > This has been bugging me since my first response... 
> > Although it may 
> > > > not explain why it's not working, try adding 
> > 'namespace="/"' to your 
> > > > package declaration. I was reading through the docs, and I don't 
> > > > think it indicates that it is necessary. But, just for 
> > testing sake, 
> > > > see if that fixes it.
> > > 
> > > Weird.  The good news is that fixes it.  Can someone tell me why?
> > > Perhaps this is a good thing to write a validation for (that is, 
> > > should the lack of a namespace attribute be an error?)?  
> > The sort of 
> > > bad news is that it just fails at a later point (I stepped 
> > through the 
> > > code and saw it pass by the previous point it was throwing an 
> > > exception).  It now does this:
> > > 
> > > Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
> > > internalGetPageContext
> > > SEVERE: Exception initializing page context
> > > java.lang.IllegalStateException: Cannot create a session after the 
> > > response has been committed
> > > 
> > > I'm not including the entire stack trace, because after 
> > googling this, 
> > > I found the following internet-ancient reference to this:
> > > 
> > > http://www.mail-archive.com/user@struts.apache.org/msg54986.html
> > > 
> > > In short, once I turned off devmode, it worked.  I checked JIRA for 
> > > issues involving devmode, and all of them appeared to be resolved.
> > > 
> > > In any case, I'm moving forward now.  Thanks for the help.
> > > 
> > > > 
> > > > -Wes
> > > > 
> > > > On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > > > > Oh, and if it helps, this is the output on my browser when
> > > > executing
> > > > > with "debug=xml":
> > > > > 
> > > > > <debug>
> > > > > <parameters/>
> > > > > <context>
> > > > > <struts.actionMapping>
> > > > > <class>class
> > > > > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > > > > <name>main</name>
> > > > > <namespace>/</namespace>
> > > > > </struts.actionMapping>
> > > > > <attr/>
> > > > > <report.conversion.errors>false</report.conversion.errors>
> > > > > </context>
> > > > > <request/>
> > > > > <session/>
> > > > > <valueStack>
> > > > > <value>
> > > > > <actionErrors/>
> > > > > <actionMessages/>
> > > > > <class>class com.wamu.struts.helloworld.MainAction</class>
> > > > > <errorMessages/>
> > > > > <errors/>
> > > > > <fieldErrors/>
> > > > > <locale>
> > > > > <ISO3Country>USA</ISO3Country>
> > > > > <ISO3Language>eng</ISO3Language>
> > > > > <class>class java.util.Locale</class> <country>US</country> 
> > > > > <displayCountry>United States</displayCountry> 
> > > > > <displayLanguage>English</displayLanguage>
> > > > > <displayName>English (United States)</displayName>
> > > > <displayVariant/>
> > > > > <language>en</language> <variant/> </locale> <tabs> <value> 
> > > > > <class>class 
> > com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > > <label>ABC</label>
> > > > > <name>abc</name>
> > > > > </value>
> > > > > <value>
> > > > > <class>class 
> > com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > > <label>DEF</label>
> > > > > <name>def</name>
> > > > > </value>
> > > > > </tabs>
> > > > > </value>
> > > > > <value>
> > > > > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > > > > </value>
> > > > > </valueStack>
> > > > > </debug>
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > > > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Simple helloworld test fails with "Could 
> > not find 
> > > > > > action or result"
> > > > > > 
> > > > > > Jeromy is correct
> > > > > > At the very least we'll need to see the configuration
> > > > files located
> > > > > > in /WEB-INF such as
> > > > > > 
> > > > > > web.xml
> > > > > > struts-xml
> > > > > > struts-config.xml
> > > > > > validation.xml
> > > > > > web.xml
> > > > > > struts-tags.xml
> > > > > > validation.xml
> > > > > > struts-tags.xml
> > > > > > struts-actionchaining.xml
> > > > > > struts-integration.xml
> > > > > > struts-jsf.xml
> > > > > > 
> > > > > > These configuration files will give us of the
> > > > layout/design you're
> > > > > > using
> > > > > > 
> > > > > > Martin
> > > > > > ----- Original Message -----
> > > > > > From: "Karr, David" <da...@wamu.net>
> > > > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > > > > Subject: RE: Simple helloworld test fails with "Could 
> > not find 
> > > > > > action or result"
> > > > > > 
> > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: Re: Simple helloworld test fails with "Could not
> > > > > > find action
> > > > > > > or result"
> > > > > > >
> > > > > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > > > > 
> > > > > > In my Eclipse project, it's at the root of my "src" 
> > > > > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > > > > If it wasn't found, I would be seeing more serious errors.
> > > > > > 
> > > > > > > In your struts.xml your action named "main2" has no class.
> > > > > > 
> > > > > > Take that back :) .
> > > > > > 
> > > > > > Yes, I know that.  That's the point.  "main2" has no
> > > > Action class,
> > > > > > but "main" does, and "main" fails for no obvious reason.
> > > > > > 
> > > > > > > can you post more of your code?
> > > > > > 
> > > > > > What else would you want to see?  There's really nothing else.
> > > > > > 
> > > > > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David
> > > > <da...@wamu.net>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Jeromy Evans 
> > > > > > > > > [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > > > > To: Struts Users Mailing List
> > > > > > > > > Subject: Re: Simple helloworld test fails with
> > > > "Could not find
> 
=== message truncated ===


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
How do you run the config-browser?  The wiki page has some info on it,
but it's ambiguous.  I copied the jar into WEB-INF/lib and redeployed,
but I'm not sure what to do now. 

> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Wednesday, March 05, 2008 8:05 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> I'm still a little puzzled by this.
> 
> If you have a chance could you remove the namespace bit on 
> the package and see what the config-browser reports? I'm also 
> curious what happens if you change the name of the package to 
> "default".
> 
> Thanks,
> Dave
> 
> --- "Karr, David" <da...@wamu.net> wrote:
> 
> > > -----Original Message-----
> > > From: Wes Wannemacher [mailto:wesw@wantii.com]
> > > Sent: Wednesday, March 05, 2008 7:11 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > action orresult"
> > > 
> > > David,
> > > 
> > > This has been bugging me since my first response... 
> Although it may 
> > > not explain why it's not working, try adding 
> 'namespace="/"' to your 
> > > package declaration. I was reading through the docs, and I don't 
> > > think it indicates that it is necessary. But, just for 
> testing sake, 
> > > see if that fixes it.
> > 
> > Weird.  The good news is that fixes it.  Can someone tell me why?
> > Perhaps this is a good thing to write a validation for (that is, 
> > should the lack of a namespace attribute be an error?)?  
> The sort of 
> > bad news is that it just fails at a later point (I stepped 
> through the 
> > code and saw it pass by the previous point it was throwing an 
> > exception).  It now does this:
> > 
> > Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
> > internalGetPageContext
> > SEVERE: Exception initializing page context
> > java.lang.IllegalStateException: Cannot create a session after the 
> > response has been committed
> > 
> > I'm not including the entire stack trace, because after 
> googling this, 
> > I found the following internet-ancient reference to this:
> > 
> > http://www.mail-archive.com/user@struts.apache.org/msg54986.html
> > 
> > In short, once I turned off devmode, it worked.  I checked JIRA for 
> > issues involving devmode, and all of them appeared to be resolved.
> > 
> > In any case, I'm moving forward now.  Thanks for the help.
> > 
> > > 
> > > -Wes
> > > 
> > > On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > > > Oh, and if it helps, this is the output on my browser when
> > > executing
> > > > with "debug=xml":
> > > > 
> > > > <debug>
> > > > <parameters/>
> > > > <context>
> > > > <struts.actionMapping>
> > > > <class>class
> > > > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > > > <name>main</name>
> > > > <namespace>/</namespace>
> > > > </struts.actionMapping>
> > > > <attr/>
> > > > <report.conversion.errors>false</report.conversion.errors>
> > > > </context>
> > > > <request/>
> > > > <session/>
> > > > <valueStack>
> > > > <value>
> > > > <actionErrors/>
> > > > <actionMessages/>
> > > > <class>class com.wamu.struts.helloworld.MainAction</class>
> > > > <errorMessages/>
> > > > <errors/>
> > > > <fieldErrors/>
> > > > <locale>
> > > > <ISO3Country>USA</ISO3Country>
> > > > <ISO3Language>eng</ISO3Language>
> > > > <class>class java.util.Locale</class> <country>US</country> 
> > > > <displayCountry>United States</displayCountry> 
> > > > <displayLanguage>English</displayLanguage>
> > > > <displayName>English (United States)</displayName>
> > > <displayVariant/>
> > > > <language>en</language> <variant/> </locale> <tabs> <value> 
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>ABC</label>
> > > > <name>abc</name>
> > > > </value>
> > > > <value>
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>DEF</label>
> > > > <name>def</name>
> > > > </value>
> > > > </tabs>
> > > > </value>
> > > > <value>
> > > > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > > > </value>
> > > > </valueStack>
> > > > </debug>
> > > > 
> > > > > -----Original Message-----
> > > > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > Jeromy is correct
> > > > > At the very least we'll need to see the configuration
> > > files located
> > > > > in /WEB-INF such as
> > > > > 
> > > > > web.xml
> > > > > struts-xml
> > > > > struts-config.xml
> > > > > validation.xml
> > > > > web.xml
> > > > > struts-tags.xml
> > > > > validation.xml
> > > > > struts-tags.xml
> > > > > struts-actionchaining.xml
> > > > > struts-integration.xml
> > > > > struts-jsf.xml
> > > > > 
> > > > > These configuration files will give us of the
> > > layout/design you're
> > > > > using
> > > > > 
> > > > > Martin
> > > > > ----- Original Message -----
> > > > > From: "Karr, David" <da...@wamu.net>
> > > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > > > Subject: RE: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Simple helloworld test fails with "Could not
> > > > > find action
> > > > > > or result"
> > > > > >
> > > > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > > > 
> > > > > In my Eclipse project, it's at the root of my "src" 
> > > > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > > > If it wasn't found, I would be seeing more serious errors.
> > > > > 
> > > > > > In your struts.xml your action named "main2" has no class.
> > > > > 
> > > > > Take that back :) .
> > > > > 
> > > > > Yes, I know that.  That's the point.  "main2" has no
> > > Action class,
> > > > > but "main" does, and "main" fails for no obvious reason.
> > > > > 
> > > > > > can you post more of your code?
> > > > > 
> > > > > What else would you want to see?  There's really nothing else.
> > > > > 
> > > > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David
> > > <da...@wamu.net>
> > > > > > wrote:
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Jeromy Evans 
> > > > > > > > [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > > > To: Struts Users Mailing List
> > > > > > > > Subject: Re: Simple helloworld test fails with
> > > "Could not find
> > > > > > > > action or result"
> > > > > > > >
> > > > > > > > I don't see anything wrong with it, provided MainAction 
> > > > > > > > returns "success" (MainAction.java wasn't attached).
> > > > > > >
> > > > > > > Cute.  I guess my company decided that java is unsafe, so
> > > > > > they removed
> > > > > > > it from the attachments :) .  I'll reattach it with a
> > > fake extent.
> > > > > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > > > > >
> > > > > > > The Action implementation extends ActionSupport, and it's
> > > > > using the
> > > > > > > SUCCESS constant.
> > > > > > >
> > > > > > > > Is it possible you have a conflicting struts.xml
> > > > > deployed in the
> > > > > > > > webapp, or any plugin jars deployed?  The only 
> other time
> > > > > > I've seen
> > > > > > > > the response you're returning the correct result code
> > > > > is when the
> > > > > > > > Result implementation has encountered an error (not
> > > using the
> > > > > > > > CodeBehind plugin are you?)
> > > > > > >
> > > > > > > I have the following jars in WEB-INF/lib:
> > > > > > >
> > > > > > > spring-context-2.0.5.jar
> > > > > > > spring-core-2.0.5.jar
> > > > > > > commons-logging-1.0.4.jar
> > > > > > > spring-web-2.0.5.jar
> > > > > > > freemarker-2.3.8.jar
> > > > > > > struts2-core-2.0.11.jar
> > 
> === message truncated ===
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
--- "Karr, David" <da...@wamu.net> wrote:
> > So is the "package" attribute supposed to match the Java 
> > package of the Action classes?  Martin Gainty had earlier 
> > said I should use actionPackages.  Before I added that, it 
> > wasn't even getting into my Action classes at all.  If I now 
> > remove actionPackages, change the package attribute to match 
> > my Java class, and then remove the namespace attribute, do 
> > you expect that will work?
> 
> I can self-answer this, I guess.  After removing actionPackages, and
> setting the "package" attribute to match the Java class (something I can
> easily see someone assuming) makes it say this (it's even bad grammar,
> besides being a broken message):

What "package" attribute? In the struts config file? I'll look in to that. I
don't think the documentation states anything in particular about naming
requirements for packages; if there is one we'll document it.

> Are there still any issues hiding here that I should know about?

I'm not sure how we'd know if there were or not. This is the first time,
AFAIK, that these issues have come up at all. You tried to mix two forms of
configuration; AFAIK the actionPackages element is only for zero-config,
annotation-based configuration. Most people don't try to mix the two, I
guess.

Dave


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Karr, David 
> Sent: Thursday, March 06, 2008 6:30 AM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> So is the "package" attribute supposed to match the Java 
> package of the Action classes?  Martin Gainty had earlier 
> said I should use actionPackages.  Before I added that, it 
> wasn't even getting into my Action classes at all.  If I now 
> remove actionPackages, change the package attribute to match 
> my Java class, and then remove the namespace attribute, do 
> you expect that will work?

I can self-answer this, I guess.  After removing actionPackages, and
setting the "package" attribute to match the Java class (something I can
easily see someone assuming) makes it say this (it's even bad grammar,
besides being a broken message):

The package name 'com.wamu.struts.helloworld' at location null is
already been used by another package at location package - file:...

So, I changed the package attribute to "default", and now everything
seems to work fine (except for the tabpanel looking wonky on firefox,
but that's a different matter).

Are there still any issues hiding here that I should know about?

> > -----Original Message-----
> > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > Sent: Wednesday, March 05, 2008 11:35 PM
> > To: Struts Users Mailing List
> > Subject: Re: Simple helloworld test fails with "Could not 
> find action 
> > orresult"
> > 
> > I can reproduce it using David's source.
> > 
> > In his original broken struts.xml configuration (no namespace 
> > specification, reposted below) , four packages are configured:
> >  "struts-default" in namespace "",
> >  "string-default" in namesapce "",
> >  "helloworld" in namespace "", and
> >  "com.wamu.struts.helloworld" in namespace ""
> > 
> > The "helloworld" package contains 2 valid actions (main, 
> main2, each 
> > with results), an interceptor stack and a parent
> > (struts-defaullt)
> > 
> > The "com.wamu.struts.helloworld" package contains 1 action called 
> > main, with NO results, NO interceptors and a parent 
> (struts-default). 
> > (WTF!)
> > 
> > This results in two non-abstract packages in the same 
> namespace with 
> > the same action name.  XWork 2.1.0+ generates an error if 
> that occurs, 
> > but in this version it's permitted.
> > The /main.action URL matches the "com.wamu.struts.helloworld" 
> > package. 
> > Setting the namespace to "/" in struts.xml matches helloworld (the 
> > other package remains).
> > 
> > Any theories where the 4th package is being created? CLUE: 
> > take a harder look at web.xml in the original post.
> > 
> > repost of struts.xml
> > 
> > !DOCTYPE struts PUBLIC
> >     "-//Apache Software Foundation//DTD Struts 
> Configuration 2.0//EN"
> >     "http://struts.apache.org/dtds/struts-2.0.dtd">
> > 
> > <struts>
> >   <constant name="struts.devMode" value="true" />
> > 
> >   <package name="helloworld" extends="struts-default">
> >     <interceptors>
> >       <interceptor-stack name="stack">
> >         <interceptor-ref name="defaultStack" />
> >       </interceptor-stack>
> >     </interceptors>
> >     <action name="main" 
> class="com.wamu.struts.helloworld.MainAction">
> >       <result name="success">/main.jsp</result>
> >     </action>
> >     <action name="main2">
> >       <result name="success">/main.jsp</result>
> >     </action>
> >   </package>
> > </struts>
> > 
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 
> 

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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
So is the "package" attribute supposed to match the Java package of the
Action classes?  Martin Gainty had earlier said I should use
actionPackages.  Before I added that, it wasn't even getting into my
Action classes at all.  If I now remove actionPackages, change the
package attribute to match my Java class, and then remove the namespace
attribute, do you expect that will work?

> -----Original Message-----
> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
> Sent: Wednesday, March 05, 2008 11:35 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> I can reproduce it using David's source.
> 
> In his original broken struts.xml configuration (no namespace 
> specification, reposted below) , four packages are configured:
>  "struts-default" in namespace "",
>  "string-default" in namesapce "",
>  "helloworld" in namespace "", and
>  "com.wamu.struts.helloworld" in namespace ""
> 
> The "helloworld" package contains 2 valid actions (main, 
> main2, each with results), an interceptor stack and a parent 
> (struts-defaullt)
> 
> The "com.wamu.struts.helloworld" package contains 1 action 
> called main, with NO results, NO interceptors and a parent 
> (struts-default). (WTF!)
> 
> This results in two non-abstract packages in the same 
> namespace with the same action name.  XWork 2.1.0+ generates 
> an error if that occurs, but in this version it's permitted.
> The /main.action URL matches the "com.wamu.struts.helloworld" 
> package. 
> Setting the namespace to "/" in struts.xml matches helloworld 
> (the other package remains).
> 
> Any theories where the 4th package is being created? CLUE: 
> take a harder look at web.xml in the original post.
> 
> repost of struts.xml
> 
> !DOCTYPE struts PUBLIC
>     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>     "http://struts.apache.org/dtds/struts-2.0.dtd">
> 
> <struts>
>   <constant name="struts.devMode" value="true" />
> 
>   <package name="helloworld" extends="struts-default">
>     <interceptors>
>       <interceptor-stack name="stack">
>         <interceptor-ref name="defaultStack" />
>       </interceptor-stack>
>     </interceptors>
>     <action name="main" class="com.wamu.struts.helloworld.MainAction">
>       <result name="success">/main.jsp</result>
>     </action>
>     <action name="main2">
>       <result name="success">/main.jsp</result>
>     </action>
>   </package>
> </struts>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Simple helloworld test fails with "Could not find action orresult"

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Dave Newton wrote:
> --- Jeromy Evans <je...@blueskyminds.com.au> wrote:
>   
>> Any theories where the 4th package is being created? CLUE: take a harder 
>> look at web.xml in the original post.
>>     
>
> That's why I asked about the actionPackages element; is that it?
>
> Dave
>
>   
Precisely.  I didn't realise that ZeroConfiguration detection is build 
straight into the Distpatcher in 2.0.x.
The presence of the actionPackages init-parm enabled the 
ZeroConfiguration package provider, and ZeroConfiguration detected the 
MainAction in the "com.wamu.struts.helloworld" package. It had no 
corresponding Results. 

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


Re: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
--- Jeromy Evans <je...@blueskyminds.com.au> wrote:
> Any theories where the 4th package is being created? CLUE: take a harder 
> look at web.xml in the original post.

That's why I asked about the actionPackages element; is that it?

Dave


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


Re: Simple helloworld test fails with "Could not find action orresult"

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I can reproduce it using David's source.

In his original broken struts.xml configuration (no namespace 
specification, reposted below) , four packages are configured:
 "struts-default" in namespace "",
 "string-default" in namesapce "",
 "helloworld" in namespace "", and
 "com.wamu.struts.helloworld" in namespace ""

The "helloworld" package contains 2 valid actions (main, main2, each 
with results), an interceptor stack and a parent (struts-defaullt)

The "com.wamu.struts.helloworld" package contains 1 action called main, 
with NO results, NO interceptors and a parent (struts-default). (WTF!)

This results in two non-abstract packages in the same namespace with the 
same action name.  XWork 2.1.0+ generates an error if that occurs, but 
in this version it's permitted.
The /main.action URL matches the "com.wamu.struts.helloworld" package. 
Setting the namespace to "/" in struts.xml matches helloworld (the other 
package remains).

Any theories where the 4th package is being created? CLUE: take a harder 
look at web.xml in the original post.

repost of struts.xml

!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
  <constant name="struts.devMode" value="true" />

  <package name="helloworld" extends="struts-default">
    <interceptors>
      <interceptor-stack name="stack">
        <interceptor-ref name="defaultStack" />
      </interceptor-stack>
    </interceptors>
    <action name="main" class="com.wamu.struts.helloworld.MainAction">
      <result name="success">/main.jsp</result>
    </action>
    <action name="main2">
      <result name="success">/main.jsp</result>
    </action>
  </package>
</struts>





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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
I think you mentioned this, but is it still broken (no result config) when
you take out the actionPackages element? If it is, I have no clue; I can't
dupe. I'd have to start over again tomorrow.

Dave

--- "Karr, David" <da...@wamu.net> wrote:

> Below the main "Action Information - main" table, the contents of the
> "Results" tab is empty. 
> 
> > -----Original Message-----
> > From: Dave Newton [mailto:newton.dave@yahoo.com] 
> > Sent: Wednesday, March 05, 2008 9:21 PM
> > To: Struts Users Mailing List
> > Subject: RE: Simple helloworld test fails with "Could not 
> > find action orresult"
> > 
> > And the config browser isn't recognizing the "success" result 
> > configuration?
> > Normally it will list the configured results under the 
> > information you said it listed. Man, I sure haven't been able 
> > to dupe this yet.
> > 
> > --- "Karr, David" <da...@wamu.net> wrote:
> > 
> > > "No result defined for action com.wamu.struts.helloworld.MainAction 
> > > and result success"
> > > 
> > > > -----Original Message-----
> > > > From: Dave Newton [mailto:newton.dave@yahoo.com]
> > > > Sent: Wednesday, March 05, 2008 8:41 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > > action orresult"
> > > > 
> > > > And when you visit that location it's giving you the 
> > error about not 
> > > > having a result for "success"?
> > > > 
> > > > Dave
> > > > 
> > > > --- "Karr, David" <da...@wamu.net> wrote:
> > > > > Without the namespace attribute, config-browser reports this:
> > > > > 
> > > > > Action name:	main
> > > > > Namespace:	
> > > > > Action class:	com.wamu.struts.helloworld.MainAction
> > > > > Action method:	
> > > > > Parameters:	
> > > > > Default location:	/struts-helloworld/main.action 
> > > > 
> > > > 
> > > > 
> > --------------------------------------------------------------------
> > > > - 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
> > > 
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
Below the main "Action Information - main" table, the contents of the
"Results" tab is empty. 

> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Wednesday, March 05, 2008 9:21 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> And the config browser isn't recognizing the "success" result 
> configuration?
> Normally it will list the configured results under the 
> information you said it listed. Man, I sure haven't been able 
> to dupe this yet.
> 
> --- "Karr, David" <da...@wamu.net> wrote:
> 
> > "No result defined for action com.wamu.struts.helloworld.MainAction 
> > and result success"
> > 
> > > -----Original Message-----
> > > From: Dave Newton [mailto:newton.dave@yahoo.com]
> > > Sent: Wednesday, March 05, 2008 8:41 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > action orresult"
> > > 
> > > And when you visit that location it's giving you the 
> error about not 
> > > having a result for "success"?
> > > 
> > > Dave
> > > 
> > > --- "Karr, David" <da...@wamu.net> wrote:
> > > > Without the namespace attribute, config-browser reports this:
> > > > 
> > > > Action name:	main
> > > > Namespace:	
> > > > Action class:	com.wamu.struts.helloworld.MainAction
> > > > Action method:	
> > > > Parameters:	
> > > > Default location:	/struts-helloworld/main.action 
> > > 
> > > 
> > > 
> --------------------------------------------------------------------
> > > - 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
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
And the config browser isn't recognizing the "success" result configuration?
Normally it will list the configured results under the information you said
it listed. Man, I sure haven't been able to dupe this yet.

--- "Karr, David" <da...@wamu.net> wrote:

> "No result defined for action com.wamu.struts.helloworld.MainAction and
> result success" 
> 
> > -----Original Message-----
> > From: Dave Newton [mailto:newton.dave@yahoo.com] 
> > Sent: Wednesday, March 05, 2008 8:41 PM
> > To: Struts Users Mailing List
> > Subject: RE: Simple helloworld test fails with "Could not 
> > find action orresult"
> > 
> > And when you visit that location it's giving you the error 
> > about not having a result for "success"?
> > 
> > Dave
> > 
> > --- "Karr, David" <da...@wamu.net> wrote:
> > > Without the namespace attribute, config-browser reports this:
> > > 
> > > Action name:	main
> > > Namespace:	
> > > Action class:	com.wamu.struts.helloworld.MainAction
> > > Action method:	
> > > Parameters:	
> > > Default location:	/struts-helloworld/main.action 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
"No result defined for action com.wamu.struts.helloworld.MainAction and
result success" 

> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Wednesday, March 05, 2008 8:41 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> And when you visit that location it's giving you the error 
> about not having a result for "success"?
> 
> Dave
> 
> --- "Karr, David" <da...@wamu.net> wrote:
> > Without the namespace attribute, config-browser reports this:
> > 
> > Action name:	main
> > Namespace:	
> > Action class:	com.wamu.struts.helloworld.MainAction
> > Action method:	
> > Parameters:	
> > Default location:	/struts-helloworld/main.action 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
And when you visit that location it's giving you the error about not having a
result for "success"?

Dave

--- "Karr, David" <da...@wamu.net> wrote:
> Without the namespace attribute, config-browser reports this:
> 
> Action name:	main
> Namespace:	
> Action class:	com.wamu.struts.helloworld.MainAction
> Action method:	
> Parameters:	
> Default location:	/struts-helloworld/main.action 


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
Without the namespace attribute, config-browser reports this:

Action name:	main
Namespace:	
Action class:	com.wamu.struts.helloworld.MainAction
Action method:	
Parameters:	
Default location:	/struts-helloworld/main.action 

> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Wednesday, March 05, 2008 8:05 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> I'm still a little puzzled by this.
> 
> If you have a chance could you remove the namespace bit on 
> the package and see what the config-browser reports? I'm also 
> curious what happens if you change the name of the package to 
> "default".
> 
> Thanks,
> Dave
> 
> --- "Karr, David" <da...@wamu.net> wrote:
> 
> > > -----Original Message-----
> > > From: Wes Wannemacher [mailto:wesw@wantii.com]
> > > Sent: Wednesday, March 05, 2008 7:11 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > action orresult"
> > > 
> > > David,
> > > 
> > > This has been bugging me since my first response... 
> Although it may 
> > > not explain why it's not working, try adding 
> 'namespace="/"' to your 
> > > package declaration. I was reading through the docs, and I don't 
> > > think it indicates that it is necessary. But, just for 
> testing sake, 
> > > see if that fixes it.
> > 
> > Weird.  The good news is that fixes it.  Can someone tell me why?
> > Perhaps this is a good thing to write a validation for (that is, 
> > should the lack of a namespace attribute be an error?)?  
> The sort of 
> > bad news is that it just fails at a later point (I stepped 
> through the 
> > code and saw it pass by the previous point it was throwing an 
> > exception).  It now does this:
> > 
> > Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
> > internalGetPageContext
> > SEVERE: Exception initializing page context
> > java.lang.IllegalStateException: Cannot create a session after the 
> > response has been committed
> > 
> > I'm not including the entire stack trace, because after 
> googling this, 
> > I found the following internet-ancient reference to this:
> > 
> > http://www.mail-archive.com/user@struts.apache.org/msg54986.html
> > 
> > In short, once I turned off devmode, it worked.  I checked JIRA for 
> > issues involving devmode, and all of them appeared to be resolved.
> > 
> > In any case, I'm moving forward now.  Thanks for the help.
> > 
> > > 
> > > -Wes
> > > 
> > > On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > > > Oh, and if it helps, this is the output on my browser when
> > > executing
> > > > with "debug=xml":
> > > > 
> > > > <debug>
> > > > <parameters/>
> > > > <context>
> > > > <struts.actionMapping>
> > > > <class>class
> > > > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > > > <name>main</name>
> > > > <namespace>/</namespace>
> > > > </struts.actionMapping>
> > > > <attr/>
> > > > <report.conversion.errors>false</report.conversion.errors>
> > > > </context>
> > > > <request/>
> > > > <session/>
> > > > <valueStack>
> > > > <value>
> > > > <actionErrors/>
> > > > <actionMessages/>
> > > > <class>class com.wamu.struts.helloworld.MainAction</class>
> > > > <errorMessages/>
> > > > <errors/>
> > > > <fieldErrors/>
> > > > <locale>
> > > > <ISO3Country>USA</ISO3Country>
> > > > <ISO3Language>eng</ISO3Language>
> > > > <class>class java.util.Locale</class> <country>US</country> 
> > > > <displayCountry>United States</displayCountry> 
> > > > <displayLanguage>English</displayLanguage>
> > > > <displayName>English (United States)</displayName>
> > > <displayVariant/>
> > > > <language>en</language> <variant/> </locale> <tabs> <value> 
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>ABC</label>
> > > > <name>abc</name>
> > > > </value>
> > > > <value>
> > > > <class>class 
> com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > > <label>DEF</label>
> > > > <name>def</name>
> > > > </value>
> > > > </tabs>
> > > > </value>
> > > > <value>
> > > > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > > > </value>
> > > > </valueStack>
> > > > </debug>
> > > > 
> > > > > -----Original Message-----
> > > > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > Jeromy is correct
> > > > > At the very least we'll need to see the configuration
> > > files located
> > > > > in /WEB-INF such as
> > > > > 
> > > > > web.xml
> > > > > struts-xml
> > > > > struts-config.xml
> > > > > validation.xml
> > > > > web.xml
> > > > > struts-tags.xml
> > > > > validation.xml
> > > > > struts-tags.xml
> > > > > struts-actionchaining.xml
> > > > > struts-integration.xml
> > > > > struts-jsf.xml
> > > > > 
> > > > > These configuration files will give us of the
> > > layout/design you're
> > > > > using
> > > > > 
> > > > > Martin
> > > > > ----- Original Message -----
> > > > > From: "Karr, David" <da...@wamu.net>
> > > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > > > Subject: RE: Simple helloworld test fails with "Could 
> not find 
> > > > > action or result"
> > > > > 
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Simple helloworld test fails with "Could not
> > > > > find action
> > > > > > or result"
> > > > > >
> > > > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > > > 
> > > > > In my Eclipse project, it's at the root of my "src" 
> > > > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > > > If it wasn't found, I would be seeing more serious errors.
> > > > > 
> > > > > > In your struts.xml your action named "main2" has no class.
> > > > > 
> > > > > Take that back :) .
> > > > > 
> > > > > Yes, I know that.  That's the point.  "main2" has no
> > > Action class,
> > > > > but "main" does, and "main" fails for no obvious reason.
> > > > > 
> > > > > > can you post more of your code?
> > > > > 
> > > > > What else would you want to see?  There's really nothing else.
> > > > > 
> > > > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David
> > > <da...@wamu.net>
> > > > > > wrote:
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Jeromy Evans 
> > > > > > > > [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > > > To: Struts Users Mailing List
> > > > > > > > Subject: Re: Simple helloworld test fails with
> > > "Could not find
> > > > > > > > action or result"
> > > > > > > >
> > > > > > > > I don't see anything wrong with it, provided MainAction 
> > > > > > > > returns "success" (MainAction.java wasn't attached).
> > > > > > >
> > > > > > > Cute.  I guess my company decided that java is unsafe, so
> > > > > > they removed
> > > > > > > it from the attachments :) .  I'll reattach it with a
> > > fake extent.
> > > > > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > > > > >
> > > > > > > The Action implementation extends ActionSupport, and it's
> > > > > using the
> > > > > > > SUCCESS constant.
> > > > > > >
> > > > > > > > Is it possible you have a conflicting struts.xml
> > > > > deployed in the
> > > > > > > > webapp, or any plugin jars deployed?  The only 
> other time
> > > > > > I've seen
> > > > > > > > the response you're returning the correct result code
> > > > > is when the
> > > > > > > > Result implementation has encountered an error (not
> > > using the
> > > > > > > > CodeBehind plugin are you?)
> > > > > > >
> > > > > > > I have the following jars in WEB-INF/lib:
> > > > > > >
> > > > > > > spring-context-2.0.5.jar
> > > > > > > spring-core-2.0.5.jar
> > > > > > > commons-logging-1.0.4.jar
> > > > > > > spring-web-2.0.5.jar
> > > > > > > freemarker-2.3.8.jar
> > > > > > > struts2-core-2.0.11.jar
> > 
> === message truncated ===
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by Dave Newton <ne...@yahoo.com>.
I'm still a little puzzled by this.

If you have a chance could you remove the namespace bit on the package and
see what the config-browser reports? I'm also curious what happens if you
change the name of the package to "default".

Thanks,
Dave

--- "Karr, David" <da...@wamu.net> wrote:

> > -----Original Message-----
> > From: Wes Wannemacher [mailto:wesw@wantii.com] 
> > Sent: Wednesday, March 05, 2008 7:11 PM
> > To: Struts Users Mailing List
> > Subject: RE: Simple helloworld test fails with "Could not 
> > find action orresult"
> > 
> > David,
> > 
> > This has been bugging me since my first response... Although 
> > it may not explain why it's not working, try adding 
> > 'namespace="/"' to your package declaration. I was reading 
> > through the docs, and I don't think it indicates that it is 
> > necessary. But, just for testing sake, see if that fixes it.
> 
> Weird.  The good news is that fixes it.  Can someone tell me why?
> Perhaps this is a good thing to write a validation for (that is, should
> the lack of a namespace attribute be an error?)?  The sort of bad news
> is that it just fails at a later point (I stepped through the code and
> saw it pass by the previous point it was throwing an exception).  It now
> does this:
> 
> Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
> internalGetPageContext
> SEVERE: Exception initializing page context
> java.lang.IllegalStateException: Cannot create a session after the
> response has been committed
> 
> I'm not including the entire stack trace, because after googling this, I
> found the following internet-ancient reference to this:
> 
> http://www.mail-archive.com/user@struts.apache.org/msg54986.html
> 
> In short, once I turned off devmode, it worked.  I checked JIRA for
> issues involving devmode, and all of them appeared to be resolved.
> 
> In any case, I'm moving forward now.  Thanks for the help.
> 
> > 
> > -Wes
> > 
> > On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > > Oh, and if it helps, this is the output on my browser when 
> > executing 
> > > with "debug=xml":
> > > 
> > > <debug>
> > > <parameters/>
> > > <context>
> > > <struts.actionMapping>
> > > <class>class 
> > > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > > <name>main</name>
> > > <namespace>/</namespace>
> > > </struts.actionMapping>
> > > <attr/>
> > > <report.conversion.errors>false</report.conversion.errors>
> > > </context>
> > > <request/>
> > > <session/>
> > > <valueStack>
> > > <value>
> > > <actionErrors/>
> > > <actionMessages/>
> > > <class>class com.wamu.struts.helloworld.MainAction</class>
> > > <errorMessages/>
> > > <errors/>
> > > <fieldErrors/>
> > > <locale>
> > > <ISO3Country>USA</ISO3Country>
> > > <ISO3Language>eng</ISO3Language>
> > > <class>class java.util.Locale</class>
> > > <country>US</country>
> > > <displayCountry>United States</displayCountry> 
> > > <displayLanguage>English</displayLanguage>
> > > <displayName>English (United States)</displayName> 
> > <displayVariant/> 
> > > <language>en</language> <variant/> </locale> <tabs> <value> 
> > > <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > <label>ABC</label>
> > > <name>abc</name>
> > > </value>
> > > <value>
> > > <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > > <label>DEF</label>
> > > <name>def</name>
> > > </value>
> > > </tabs>
> > > </value>
> > > <value>
> > > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > > </value>
> > > </valueStack>
> > > </debug>
> > > 
> > > > -----Original Message-----
> > > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > > action or result"
> > > > 
> > > > Jeromy is correct
> > > > At the very least we'll need to see the configuration 
> > files located 
> > > > in /WEB-INF such as
> > > > 
> > > > web.xml
> > > > struts-xml
> > > > struts-config.xml
> > > > validation.xml
> > > > web.xml
> > > > struts-tags.xml
> > > > validation.xml
> > > > struts-tags.xml
> > > > struts-actionchaining.xml
> > > > struts-integration.xml
> > > > struts-jsf.xml
> > > > 
> > > > These configuration files will give us of the 
> > layout/design you're 
> > > > using
> > > > 
> > > > Martin
> > > > ----- Original Message -----
> > > > From: "Karr, David" <da...@wamu.net>
> > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > > action or result"
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Simple helloworld test fails with "Could not
> > > > find action
> > > > > or result"
> > > > >
> > > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > > 
> > > > In my Eclipse project, it's at the root of my "src" 
> > > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > > If it wasn't found, I would be seeing more serious errors.
> > > > 
> > > > > In your struts.xml your action named "main2" has no class.
> > > > 
> > > > Take that back :) .
> > > > 
> > > > Yes, I know that.  That's the point.  "main2" has no 
> > Action class, 
> > > > but "main" does, and "main" fails for no obvious reason.
> > > > 
> > > > > can you post more of your code?
> > > > 
> > > > What else would you want to see?  There's really nothing else.
> > > > 
> > > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David 
> > <da...@wamu.net>
> > > > > wrote:
> > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: Re: Simple helloworld test fails with 
> > "Could not find 
> > > > > > > action or result"
> > > > > > >
> > > > > > > I don't see anything wrong with it, provided MainAction 
> > > > > > > returns "success" (MainAction.java wasn't attached).
> > > > > >
> > > > > > Cute.  I guess my company decided that java is unsafe, so
> > > > > they removed
> > > > > > it from the attachments :) .  I'll reattach it with a 
> > fake extent.
> > > > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > > > >
> > > > > > The Action implementation extends ActionSupport, and it's
> > > > using the
> > > > > > SUCCESS constant.
> > > > > >
> > > > > > > Is it possible you have a conflicting struts.xml
> > > > deployed in the
> > > > > > > webapp, or any plugin jars deployed?  The only other time
> > > > > I've seen
> > > > > > > the response you're returning the correct result code
> > > > is when the
> > > > > > > Result implementation has encountered an error (not 
> > using the 
> > > > > > > CodeBehind plugin are you?)
> > > > > >
> > > > > > I have the following jars in WEB-INF/lib:
> > > > > >
> > > > > > spring-context-2.0.5.jar
> > > > > > spring-core-2.0.5.jar
> > > > > > commons-logging-1.0.4.jar
> > > > > > spring-web-2.0.5.jar
> > > > > > freemarker-2.3.8.jar
> > > > > > struts2-core-2.0.11.jar
> 
=== message truncated ===


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


RE: Simple helloworld test fails with "Could not find action orresult"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Wes Wannemacher [mailto:wesw@wantii.com] 
> Sent: Wednesday, March 05, 2008 7:11 PM
> To: Struts Users Mailing List
> Subject: RE: Simple helloworld test fails with "Could not 
> find action orresult"
> 
> David,
> 
> This has been bugging me since my first response... Although 
> it may not explain why it's not working, try adding 
> 'namespace="/"' to your package declaration. I was reading 
> through the docs, and I don't think it indicates that it is 
> necessary. But, just for testing sake, see if that fixes it.

Weird.  The good news is that fixes it.  Can someone tell me why?
Perhaps this is a good thing to write a validation for (that is, should
the lack of a namespace attribute be an error?)?  The sort of bad news
is that it just fails at a later point (I stepped through the code and
saw it pass by the previous point it was throwing an exception).  It now
does this:

Mar 5, 2008 7:20:18 PM org.apache.jasper.runtime.JspFactoryImpl
internalGetPageContext
SEVERE: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed

I'm not including the entire stack trace, because after googling this, I
found the following internet-ancient reference to this:

http://www.mail-archive.com/user@struts.apache.org/msg54986.html

In short, once I turned off devmode, it worked.  I checked JIRA for
issues involving devmode, and all of them appeared to be resolved.

In any case, I'm moving forward now.  Thanks for the help.

> 
> -Wes
> 
> On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> > Oh, and if it helps, this is the output on my browser when 
> executing 
> > with "debug=xml":
> > 
> > <debug>
> > <parameters/>
> > <context>
> > <struts.actionMapping>
> > <class>class 
> > org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> > <name>main</name>
> > <namespace>/</namespace>
> > </struts.actionMapping>
> > <attr/>
> > <report.conversion.errors>false</report.conversion.errors>
> > </context>
> > <request/>
> > <session/>
> > <valueStack>
> > <value>
> > <actionErrors/>
> > <actionMessages/>
> > <class>class com.wamu.struts.helloworld.MainAction</class>
> > <errorMessages/>
> > <errors/>
> > <fieldErrors/>
> > <locale>
> > <ISO3Country>USA</ISO3Country>
> > <ISO3Language>eng</ISO3Language>
> > <class>class java.util.Locale</class>
> > <country>US</country>
> > <displayCountry>United States</displayCountry> 
> > <displayLanguage>English</displayLanguage>
> > <displayName>English (United States)</displayName> 
> <displayVariant/> 
> > <language>en</language> <variant/> </locale> <tabs> <value> 
> > <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > <label>ABC</label>
> > <name>abc</name>
> > </value>
> > <value>
> > <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> > <label>DEF</label>
> > <name>def</name>
> > </value>
> > </tabs>
> > </value>
> > <value>
> > <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> > </value>
> > </valueStack>
> > </debug>
> > 
> > > -----Original Message-----
> > > From: Martin Gainty [mailto:mgainty@hotmail.com]
> > > Sent: Wednesday, March 05, 2008 6:07 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > action or result"
> > > 
> > > Jeromy is correct
> > > At the very least we'll need to see the configuration 
> files located 
> > > in /WEB-INF such as
> > > 
> > > web.xml
> > > struts-xml
> > > struts-config.xml
> > > validation.xml
> > > web.xml
> > > struts-tags.xml
> > > validation.xml
> > > struts-tags.xml
> > > struts-actionchaining.xml
> > > struts-integration.xml
> > > struts-jsf.xml
> > > 
> > > These configuration files will give us of the 
> layout/design you're 
> > > using
> > > 
> > > Martin
> > > ----- Original Message -----
> > > From: "Karr, David" <da...@wamu.net>
> > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > Sent: Wednesday, March 05, 2008 7:37 PM
> > > Subject: RE: Simple helloworld test fails with "Could not find 
> > > action or result"
> > > 
> > > 
> > > > -----Original Message-----
> > > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Simple helloworld test fails with "Could not
> > > find action
> > > > or result"
> > > >
> > > > Maybe it sounds dumb but where is lyour struts.xml located?
> > > 
> > > In my Eclipse project, it's at the root of my "src" 
> > > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > > If it wasn't found, I would be seeing more serious errors.
> > > 
> > > > In your struts.xml your action named "main2" has no class.
> > > 
> > > Take that back :) .
> > > 
> > > Yes, I know that.  That's the point.  "main2" has no 
> Action class, 
> > > but "main" does, and "main" fails for no obvious reason.
> > > 
> > > > can you post more of your code?
> > > 
> > > What else would you want to see?  There's really nothing else.
> > > 
> > > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David 
> <da...@wamu.net>
> > > > wrote:
> > > >
> > > > > > -----Original Message-----
> > > > > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Simple helloworld test fails with 
> "Could not find 
> > > > > > action or result"
> > > > > >
> > > > > > I don't see anything wrong with it, provided MainAction 
> > > > > > returns "success" (MainAction.java wasn't attached).
> > > > >
> > > > > Cute.  I guess my company decided that java is unsafe, so
> > > > they removed
> > > > > it from the attachments :) .  I'll reattach it with a 
> fake extent.
> > > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > > >
> > > > > The Action implementation extends ActionSupport, and it's
> > > using the
> > > > > SUCCESS constant.
> > > > >
> > > > > > Is it possible you have a conflicting struts.xml
> > > deployed in the
> > > > > > webapp, or any plugin jars deployed?  The only other time
> > > > I've seen
> > > > > > the response you're returning the correct result code
> > > is when the
> > > > > > Result implementation has encountered an error (not 
> using the 
> > > > > > CodeBehind plugin are you?)
> > > > >
> > > > > I have the following jars in WEB-INF/lib:
> > > > >
> > > > > spring-context-2.0.5.jar
> > > > > spring-core-2.0.5.jar
> > > > > commons-logging-1.0.4.jar
> > > > > spring-web-2.0.5.jar
> > > > > freemarker-2.3.8.jar
> > > > > struts2-core-2.0.11.jar
> > > > > ognl-2.6.11.jar
> > > > > struts2-spring-plugin-2.0.11.jar spring-beans-2.0.5.jar 
> > > > > xwork-2.0.4.jar
> > > > >
> > > > > I do have the Spring plugin in there.  Could that be an
> > > issue?  I'm
> > > > > going to want to use that soon, but I'm not really 
> using it yet.
> > > > >
> > > > > I tried exporting my WAR and verifying I only have my single 
> > > > > struts.xml in it.
> > > > >
> > > > > > What happen if your go directly to /main.action and
> > > /main2.action?
> > > > >
> > > > > That's what I've been doing.  When I go to "/main.action",
> > > > I get the
> > > > > error I described.
> > > > >
> > > > > > You have setup two actions:
> > > > > >  main - implemented by MainAction, with a forward for
> > > > "success" to
> > > > > > /main.jsp
> > > > > >  main2 - implemented by ActionSupport, with a forward for
> > > > "success"
> > > > > > to /main.jsp and you're using the default 
> interceptors.  It is 
> > > > > > configured correctly.
> > > > > >
> > > > > > Karr, David wrote:
> > > > > > > I'm sure I have a simple error here, but I don't see it.
> > > > > > >
> > > > > > > I'm trying to construct a simple "hello, world" app with
> > > > > > v2.0.11.  I
> > > > > > > have an "index.jsp" that redirects to "main.action".  
> > > I started
> > > > > > > out with the "main" action just having a result
> > > > > > (name="success") going to
> > > > > > > "/main.jsp".  That appears to work.  I then cloned the
> > > > action (and
> > > > > > > changing the name), adding a "class" attribute 
> referring to
> > > > > > a simple
> > > > > > > Action class.  The Action class' execute method just
> > > > > > returns SUCCESS.
> > > > > > > I would have thought this would do the same thing as
> > > the action
> > > > > > > without the Action class, but it instead fails with "No
> > > > > > result defined
> > > > > > > for action com.wamu.struts.helloworld.MainAction 
> and result
> > > > > > success".
> > > > > > >
> > > > > > > I'll attach my struts.xml, web.xml, and 
> MainAction.java files.
> > > > > > >
> > > > > > >
> > > > > >
> > > > 
> ------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > > > --
> > > > > > >
> > > > > > >
> > > > > >
> > > > 
> ------------------------------------------------------------------
> > > > --
> > > > > > -
> > > > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > > > For additional commands, e-mail: 
> user-help@struts.apache.org
> > > > > > >
> > > > > >
> > > > 
> ------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > > > --
> > > > > > >
> > > > > > > No virus found in this incoming message.
> > > > > > > Checked by AVG Free Edition.
> > > > > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 -
> > > Release Date:
> > > > > > > 5/03/2008 6:38 PM
> > > > > >
> > > > > >
> > > > > >
> > > > 
> ------------------------------------------------------------------
> > > > --
> > > > > > - 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
> > > > >
> > > >
> > > 
> > > 
> --------------------------------------------------------------------
> > > - 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
> > > 
> > > 
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 
> 

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


RE: Simple helloworld test fails with "Could not find action or result"

Posted by Wes Wannemacher <we...@wantii.com>.
David,

This has been bugging me since my first response... Although it may not
explain why it's not working, try adding 'namespace="/"' to your package
declaration. I was reading through the docs, and I don't think it
indicates that it is necessary. But, just for testing sake, see if that
fixes it.

-Wes

On Wed, 2008-03-05 at 18:53 -0800, Karr, David wrote:
> Oh, and if it helps, this is the output on my browser when executing
> with "debug=xml":
> 
> <debug>
> <parameters/>
> <context>
> <struts.actionMapping>
> <class>class org.apache.struts2.dispatcher.mapper.ActionMapping</class>
> <name>main</name>
> <namespace>/</namespace>
> </struts.actionMapping>
> <attr/>
> <report.conversion.errors>false</report.conversion.errors>
> </context>
> <request/>
> <session/>
> <valueStack>
> <value>
> <actionErrors/>
> <actionMessages/>
> <class>class com.wamu.struts.helloworld.MainAction</class>
> <errorMessages/>
> <errors/>
> <fieldErrors/>
> <locale>
> <ISO3Country>USA</ISO3Country>
> <ISO3Language>eng</ISO3Language>
> <class>class java.util.Locale</class>
> <country>US</country>
> <displayCountry>United States</displayCountry>
> <displayLanguage>English</displayLanguage>
> <displayName>English (United States)</displayName>
> <displayVariant/>
> <language>en</language>
> <variant/>
> </locale>
> <tabs>
> <value>
> <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> <label>ABC</label>
> <name>abc</name>
> </value>
> <value>
> <class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
> <label>DEF</label>
> <name>def</name>
> </value>
> </tabs>
> </value>
> <value>
> <class>class com.opensymphony.xwork2.DefaultTextProvider</class>
> </value>
> </valueStack>
> </debug> 
> 
> > -----Original Message-----
> > From: Martin Gainty [mailto:mgainty@hotmail.com] 
> > Sent: Wednesday, March 05, 2008 6:07 PM
> > To: Struts Users Mailing List
> > Subject: Re: Simple helloworld test fails with "Could not 
> > find action or result"
> > 
> > Jeromy is correct
> > At the very least we'll need to see the configuration files 
> > located in /WEB-INF such as
> > 
> > web.xml
> > struts-xml
> > struts-config.xml
> > validation.xml
> > web.xml
> > struts-tags.xml
> > validation.xml
> > struts-tags.xml
> > struts-actionchaining.xml
> > struts-integration.xml
> > struts-jsf.xml
> > 
> > These configuration files will give us of the layout/design 
> > you're using
> > 
> > Martin
> > ----- Original Message -----
> > From: "Karr, David" <da...@wamu.net>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Wednesday, March 05, 2008 7:37 PM
> > Subject: RE: Simple helloworld test fails with "Could not 
> > find action or result"
> > 
> > 
> > > -----Original Message-----
> > > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > > Sent: Wednesday, March 05, 2008 4:24 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Simple helloworld test fails with "Could not 
> > find action 
> > > or result"
> > >
> > > Maybe it sounds dumb but where is lyour struts.xml located?
> > 
> > In my Eclipse project, it's at the root of my "src" 
> > directory.  In the WAR file, it goes into WEB-INF/classes.  
> > If it wasn't found, I would be seeing more serious errors.
> > 
> > > In your struts.xml your action named "main2" has no class.
> > 
> > Take that back :) .
> > 
> > Yes, I know that.  That's the point.  "main2" has no Action 
> > class, but "main" does, and "main" fails for no obvious reason.
> > 
> > > can you post more of your code?
> > 
> > What else would you want to see?  There's really nothing else.
> > 
> > > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David <da...@wamu.net> 
> > > wrote:
> > >
> > > > > -----Original Message-----
> > > > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > > > action or result"
> > > > >
> > > > > I don't see anything wrong with it, provided MainAction returns 
> > > > > "success" (MainAction.java wasn't attached).
> > > >
> > > > Cute.  I guess my company decided that java is unsafe, so
> > > they removed
> > > > it from the attachments :) .  I'll reattach it with a fake extent.
> > > > I'll also attach my JSP.  Perhaps that's relevant.
> > > >
> > > > The Action implementation extends ActionSupport, and it's 
> > using the 
> > > > SUCCESS constant.
> > > >
> > > > > Is it possible you have a conflicting struts.xml 
> > deployed in the 
> > > > > webapp, or any plugin jars deployed?  The only other time
> > > I've seen
> > > > > the response you're returning the correct result code 
> > is when the 
> > > > > Result implementation has encountered an error (not using the 
> > > > > CodeBehind plugin are you?)
> > > >
> > > > I have the following jars in WEB-INF/lib:
> > > >
> > > > spring-context-2.0.5.jar
> > > > spring-core-2.0.5.jar
> > > > commons-logging-1.0.4.jar
> > > > spring-web-2.0.5.jar
> > > > freemarker-2.3.8.jar
> > > > struts2-core-2.0.11.jar
> > > > ognl-2.6.11.jar
> > > > struts2-spring-plugin-2.0.11.jar
> > > > spring-beans-2.0.5.jar
> > > > xwork-2.0.4.jar
> > > >
> > > > I do have the Spring plugin in there.  Could that be an 
> > issue?  I'm 
> > > > going to want to use that soon, but I'm not really using it yet.
> > > >
> > > > I tried exporting my WAR and verifying I only have my single 
> > > > struts.xml in it.
> > > >
> > > > > What happen if your go directly to /main.action and 
> > /main2.action?
> > > >
> > > > That's what I've been doing.  When I go to "/main.action",
> > > I get the
> > > > error I described.
> > > >
> > > > > You have setup two actions:
> > > > >  main - implemented by MainAction, with a forward for
> > > "success" to
> > > > > /main.jsp
> > > > >  main2 - implemented by ActionSupport, with a forward for
> > > "success"
> > > > > to /main.jsp and you're using the default interceptors.  It is 
> > > > > configured correctly.
> > > > >
> > > > > Karr, David wrote:
> > > > > > I'm sure I have a simple error here, but I don't see it.
> > > > > >
> > > > > > I'm trying to construct a simple "hello, world" app with
> > > > > v2.0.11.  I
> > > > > > have an "index.jsp" that redirects to "main.action".  
> > I started 
> > > > > > out with the "main" action just having a result
> > > > > (name="success") going to
> > > > > > "/main.jsp".  That appears to work.  I then cloned the
> > > action (and
> > > > > > changing the name), adding a "class" attribute referring to
> > > > > a simple
> > > > > > Action class.  The Action class' execute method just
> > > > > returns SUCCESS.
> > > > > > I would have thought this would do the same thing as 
> > the action 
> > > > > > without the Action class, but it instead fails with "No
> > > > > result defined
> > > > > > for action com.wamu.struts.helloworld.MainAction and result
> > > > > success".
> > > > > >
> > > > > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > > > > >
> > > > > >
> > > > >
> > > --------------------------------------------------------------------
> > > > > --
> > > > > > --
> > > > > >
> > > > > >
> > > > >
> > > --------------------------------------------------------------------
> > > > > -
> > > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > > >
> > > > >
> > > --------------------------------------------------------------------
> > > > > --
> > > > > > --
> > > > > >
> > > > > > No virus found in this incoming message.
> > > > > > Checked by AVG Free Edition.
> > > > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - 
> > Release Date:
> > > > > > 5/03/2008 6:38 PM
> > > > >
> > > > >
> > > > >
> > > --------------------------------------------------------------------
> > > > > - 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
> > > >
> > >
> > 
> > ---------------------------------------------------------------------
> > 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
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> 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


RE: Simple helloworld test fails with "Could not find action or result"

Posted by "Karr, David" <da...@wamu.net>.
Oh, and if it helps, this is the output on my browser when executing
with "debug=xml":

<debug>
<parameters/>
<context>
<struts.actionMapping>
<class>class org.apache.struts2.dispatcher.mapper.ActionMapping</class>
<name>main</name>
<namespace>/</namespace>
</struts.actionMapping>
<attr/>
<report.conversion.errors>false</report.conversion.errors>
</context>
<request/>
<session/>
<valueStack>
<value>
<actionErrors/>
<actionMessages/>
<class>class com.wamu.struts.helloworld.MainAction</class>
<errorMessages/>
<errors/>
<fieldErrors/>
<locale>
<ISO3Country>USA</ISO3Country>
<ISO3Language>eng</ISO3Language>
<class>class java.util.Locale</class>
<country>US</country>
<displayCountry>United States</displayCountry>
<displayLanguage>English</displayLanguage>
<displayName>English (United States)</displayName>
<displayVariant/>
<language>en</language>
<variant/>
</locale>
<tabs>
<value>
<class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
<label>ABC</label>
<name>abc</name>
</value>
<value>
<class>class com.wamu.struts.helloworld.MainAction$TabInfo</class>
<label>DEF</label>
<name>def</name>
</value>
</tabs>
</value>
<value>
<class>class com.opensymphony.xwork2.DefaultTextProvider</class>
</value>
</valueStack>
</debug> 

> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Sent: Wednesday, March 05, 2008 6:07 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action or result"
> 
> Jeromy is correct
> At the very least we'll need to see the configuration files 
> located in /WEB-INF such as
> 
> web.xml
> struts-xml
> struts-config.xml
> validation.xml
> web.xml
> struts-tags.xml
> validation.xml
> struts-tags.xml
> struts-actionchaining.xml
> struts-integration.xml
> struts-jsf.xml
> 
> These configuration files will give us of the layout/design 
> you're using
> 
> Martin
> ----- Original Message -----
> From: "Karr, David" <da...@wamu.net>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, March 05, 2008 7:37 PM
> Subject: RE: Simple helloworld test fails with "Could not 
> find action or result"
> 
> 
> > -----Original Message-----
> > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > Sent: Wednesday, March 05, 2008 4:24 PM
> > To: Struts Users Mailing List
> > Subject: Re: Simple helloworld test fails with "Could not 
> find action 
> > or result"
> >
> > Maybe it sounds dumb but where is lyour struts.xml located?
> 
> In my Eclipse project, it's at the root of my "src" 
> directory.  In the WAR file, it goes into WEB-INF/classes.  
> If it wasn't found, I would be seeing more serious errors.
> 
> > In your struts.xml your action named "main2" has no class.
> 
> Take that back :) .
> 
> Yes, I know that.  That's the point.  "main2" has no Action 
> class, but "main" does, and "main" fails for no obvious reason.
> 
> > can you post more of your code?
> 
> What else would you want to see?  There's really nothing else.
> 
> > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David <da...@wamu.net> 
> > wrote:
> >
> > > > -----Original Message-----
> > > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > > action or result"
> > > >
> > > > I don't see anything wrong with it, provided MainAction returns 
> > > > "success" (MainAction.java wasn't attached).
> > >
> > > Cute.  I guess my company decided that java is unsafe, so
> > they removed
> > > it from the attachments :) .  I'll reattach it with a fake extent.
> > > I'll also attach my JSP.  Perhaps that's relevant.
> > >
> > > The Action implementation extends ActionSupport, and it's 
> using the 
> > > SUCCESS constant.
> > >
> > > > Is it possible you have a conflicting struts.xml 
> deployed in the 
> > > > webapp, or any plugin jars deployed?  The only other time
> > I've seen
> > > > the response you're returning the correct result code 
> is when the 
> > > > Result implementation has encountered an error (not using the 
> > > > CodeBehind plugin are you?)
> > >
> > > I have the following jars in WEB-INF/lib:
> > >
> > > spring-context-2.0.5.jar
> > > spring-core-2.0.5.jar
> > > commons-logging-1.0.4.jar
> > > spring-web-2.0.5.jar
> > > freemarker-2.3.8.jar
> > > struts2-core-2.0.11.jar
> > > ognl-2.6.11.jar
> > > struts2-spring-plugin-2.0.11.jar
> > > spring-beans-2.0.5.jar
> > > xwork-2.0.4.jar
> > >
> > > I do have the Spring plugin in there.  Could that be an 
> issue?  I'm 
> > > going to want to use that soon, but I'm not really using it yet.
> > >
> > > I tried exporting my WAR and verifying I only have my single 
> > > struts.xml in it.
> > >
> > > > What happen if your go directly to /main.action and 
> /main2.action?
> > >
> > > That's what I've been doing.  When I go to "/main.action",
> > I get the
> > > error I described.
> > >
> > > > You have setup two actions:
> > > >  main - implemented by MainAction, with a forward for
> > "success" to
> > > > /main.jsp
> > > >  main2 - implemented by ActionSupport, with a forward for
> > "success"
> > > > to /main.jsp and you're using the default interceptors.  It is 
> > > > configured correctly.
> > > >
> > > > Karr, David wrote:
> > > > > I'm sure I have a simple error here, but I don't see it.
> > > > >
> > > > > I'm trying to construct a simple "hello, world" app with
> > > > v2.0.11.  I
> > > > > have an "index.jsp" that redirects to "main.action".  
> I started 
> > > > > out with the "main" action just having a result
> > > > (name="success") going to
> > > > > "/main.jsp".  That appears to work.  I then cloned the
> > action (and
> > > > > changing the name), adding a "class" attribute referring to
> > > > a simple
> > > > > Action class.  The Action class' execute method just
> > > > returns SUCCESS.
> > > > > I would have thought this would do the same thing as 
> the action 
> > > > > without the Action class, but it instead fails with "No
> > > > result defined
> > > > > for action com.wamu.struts.helloworld.MainAction and result
> > > > success".
> > > > >
> > > > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > --
> > > > > --
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > --
> > > > > --
> > > > >
> > > > > No virus found in this incoming message.
> > > > > Checked by AVG Free Edition.
> > > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - 
> Release Date:
> > > > > 5/03/2008 6:38 PM
> > > >
> > > >
> > > >
> > --------------------------------------------------------------------
> > > > - 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
> > >
> >
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

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


RE: Simple helloworld test fails with "Could not find action or result"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Sent: Wednesday, March 05, 2008 6:07 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action or result"
> 
> Jeromy is correct
> At the very least we'll need to see the configuration files 
> located in /WEB-INF such as
> 
> web.xml
> struts-xml
> struts-config.xml
> validation.xml
> web.xml
> struts-tags.xml
> validation.xml
> struts-tags.xml
> struts-actionchaining.xml
> struts-integration.xml
> struts-jsf.xml

I've already attached the only configuration files present in the app,
being the web.xml and struts.xml.  I don't have any of those other
files.

> ----- Original Message -----
> From: "Karr, David" <da...@wamu.net>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, March 05, 2008 7:37 PM
> Subject: RE: Simple helloworld test fails with "Could not 
> find action or result"
> 
> 
> > -----Original Message-----
> > From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> > Sent: Wednesday, March 05, 2008 4:24 PM
> > To: Struts Users Mailing List
> > Subject: Re: Simple helloworld test fails with "Could not 
> find action 
> > or result"
> >
> > Maybe it sounds dumb but where is lyour struts.xml located?
> 
> In my Eclipse project, it's at the root of my "src" 
> directory.  In the WAR file, it goes into WEB-INF/classes.  
> If it wasn't found, I would be seeing more serious errors.
> 
> > In your struts.xml your action named "main2" has no class.
> 
> Take that back :) .
> 
> Yes, I know that.  That's the point.  "main2" has no Action 
> class, but "main" does, and "main" fails for no obvious reason.
> 
> > can you post more of your code?
> 
> What else would you want to see?  There's really nothing else.
> 
> > On Wed, Mar 5, 2008 at 6:04 PM, Karr, David <da...@wamu.net> 
> > wrote:
> >
> > > > -----Original Message-----
> > > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > > action or result"
> > > >
> > > > I don't see anything wrong with it, provided MainAction returns 
> > > > "success" (MainAction.java wasn't attached).
> > >
> > > Cute.  I guess my company decided that java is unsafe, so
> > they removed
> > > it from the attachments :) .  I'll reattach it with a fake extent.
> > > I'll also attach my JSP.  Perhaps that's relevant.
> > >
> > > The Action implementation extends ActionSupport, and it's 
> using the 
> > > SUCCESS constant.
> > >
> > > > Is it possible you have a conflicting struts.xml 
> deployed in the 
> > > > webapp, or any plugin jars deployed?  The only other time
> > I've seen
> > > > the response you're returning the correct result code 
> is when the 
> > > > Result implementation has encountered an error (not using the 
> > > > CodeBehind plugin are you?)
> > >
> > > I have the following jars in WEB-INF/lib:
> > >
> > > spring-context-2.0.5.jar
> > > spring-core-2.0.5.jar
> > > commons-logging-1.0.4.jar
> > > spring-web-2.0.5.jar
> > > freemarker-2.3.8.jar
> > > struts2-core-2.0.11.jar
> > > ognl-2.6.11.jar
> > > struts2-spring-plugin-2.0.11.jar
> > > spring-beans-2.0.5.jar
> > > xwork-2.0.4.jar
> > >
> > > I do have the Spring plugin in there.  Could that be an 
> issue?  I'm 
> > > going to want to use that soon, but I'm not really using it yet.
> > >
> > > I tried exporting my WAR and verifying I only have my single 
> > > struts.xml in it.
> > >
> > > > What happen if your go directly to /main.action and 
> /main2.action?
> > >
> > > That's what I've been doing.  When I go to "/main.action",
> > I get the
> > > error I described.
> > >
> > > > You have setup two actions:
> > > >  main - implemented by MainAction, with a forward for
> > "success" to
> > > > /main.jsp
> > > >  main2 - implemented by ActionSupport, with a forward for
> > "success"
> > > > to /main.jsp and you're using the default interceptors.  It is 
> > > > configured correctly.
> > > >
> > > > Karr, David wrote:
> > > > > I'm sure I have a simple error here, but I don't see it.
> > > > >
> > > > > I'm trying to construct a simple "hello, world" app with
> > > > v2.0.11.  I
> > > > > have an "index.jsp" that redirects to "main.action".  
> I started 
> > > > > out with the "main" action just having a result
> > > > (name="success") going to
> > > > > "/main.jsp".  That appears to work.  I then cloned the
> > action (and
> > > > > changing the name), adding a "class" attribute referring to
> > > > a simple
> > > > > Action class.  The Action class' execute method just
> > > > returns SUCCESS.
> > > > > I would have thought this would do the same thing as 
> the action 
> > > > > without the Action class, but it instead fails with "No
> > > > result defined
> > > > > for action com.wamu.struts.helloworld.MainAction and result
> > > > success".
> > > > >
> > > > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > --
> > > > > --
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > --
> > > > > --
> > > > >
> > > > > No virus found in this incoming message.
> > > > > Checked by AVG Free Edition.
> > > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - 
> Release Date:
> > > > > 5/03/2008 6:38 PM
> > > >
> > > >
> > > >
> > --------------------------------------------------------------------
> > > > - 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
> > >
> >
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

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


Re: Simple helloworld test fails with "Could not find action or result"

Posted by Martin Gainty <mg...@hotmail.com>.
Jeromy is correct
At the very least we'll need to see the configuration files located in
/WEB-INF such as

web.xml
struts-xml
struts-config.xml
validation.xml
web.xml
struts-tags.xml
validation.xml
struts-tags.xml
struts-actionchaining.xml
struts-integration.xml
struts-jsf.xml

These configuration files will give us of the layout/design you're using

Martin
----- Original Message -----
From: "Karr, David" <da...@wamu.net>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, March 05, 2008 7:37 PM
Subject: RE: Simple helloworld test fails with "Could not find action or
result"


> -----Original Message-----
> From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com]
> Sent: Wednesday, March 05, 2008 4:24 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not
> find action or result"
>
> Maybe it sounds dumb but where is lyour struts.xml located?

In my Eclipse project, it's at the root of my "src" directory.  In the
WAR file, it goes into WEB-INF/classes.  If it wasn't found, I would be
seeing more serious errors.

> In your struts.xml your action named "main2" has no class.

Take that back :) .

Yes, I know that.  That's the point.  "main2" has no Action class, but
"main" does, and "main" fails for no obvious reason.

> can you post more of your code?

What else would you want to see?  There's really nothing else.

> On Wed, Mar 5, 2008 at 6:04 PM, Karr, David
> <da...@wamu.net> wrote:
>
> > > -----Original Message-----
> > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Simple helloworld test fails with "Could not find
> > > action or result"
> > >
> > > I don't see anything wrong with it, provided MainAction returns
> > > "success" (MainAction.java wasn't attached).
> >
> > Cute.  I guess my company decided that java is unsafe, so
> they removed
> > it from the attachments :) .  I'll reattach it with a fake extent.
> > I'll also attach my JSP.  Perhaps that's relevant.
> >
> > The Action implementation extends ActionSupport, and it's using the
> > SUCCESS constant.
> >
> > > Is it possible you have a conflicting struts.xml deployed in the
> > > webapp, or any plugin jars deployed?  The only other time
> I've seen
> > > the response you're returning the correct result code is when the
> > > Result implementation has encountered an error (not using the
> > > CodeBehind plugin are you?)
> >
> > I have the following jars in WEB-INF/lib:
> >
> > spring-context-2.0.5.jar
> > spring-core-2.0.5.jar
> > commons-logging-1.0.4.jar
> > spring-web-2.0.5.jar
> > freemarker-2.3.8.jar
> > struts2-core-2.0.11.jar
> > ognl-2.6.11.jar
> > struts2-spring-plugin-2.0.11.jar
> > spring-beans-2.0.5.jar
> > xwork-2.0.4.jar
> >
> > I do have the Spring plugin in there.  Could that be an issue?  I'm
> > going to want to use that soon, but I'm not really using it yet.
> >
> > I tried exporting my WAR and verifying I only have my single
> > struts.xml in it.
> >
> > > What happen if your go directly to /main.action and /main2.action?
> >
> > That's what I've been doing.  When I go to "/main.action",
> I get the
> > error I described.
> >
> > > You have setup two actions:
> > >  main - implemented by MainAction, with a forward for
> "success" to
> > > /main.jsp
> > >  main2 - implemented by ActionSupport, with a forward for
> "success"
> > > to /main.jsp and you're using the default interceptors.  It is
> > > configured correctly.
> > >
> > > Karr, David wrote:
> > > > I'm sure I have a simple error here, but I don't see it.
> > > >
> > > > I'm trying to construct a simple "hello, world" app with
> > > v2.0.11.  I
> > > > have an "index.jsp" that redirects to "main.action".  I started
> > > > out with the "main" action just having a result
> > > (name="success") going to
> > > > "/main.jsp".  That appears to work.  I then cloned the
> action (and
> > > > changing the name), adding a "class" attribute referring to
> > > a simple
> > > > Action class.  The Action class' execute method just
> > > returns SUCCESS.
> > > > I would have thought this would do the same thing as the action
> > > > without the Action class, but it instead fails with "No
> > > result defined
> > > > for action com.wamu.struts.helloworld.MainAction and result
> > > success".
> > > >
> > > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > > >
> > > >
> > >
> --------------------------------------------------------------------
> > > --
> > > > --
> > > >
> > > >
> > >
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > >
> --------------------------------------------------------------------
> > > --
> > > > --
> > > >
> > > > No virus found in this incoming message.
> > > > Checked by AVG Free Edition.
> > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
> > > > 5/03/2008 6:38 PM
> > >
> > >
> > >
> --------------------------------------------------------------------
> > > - 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
> >
>

---------------------------------------------------------------------
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


RE: Simple helloworld test fails with "Could not find action or result"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Othon Reyes Sanchez [mailto:othon.reyes@gmail.com] 
> Sent: Wednesday, March 05, 2008 4:24 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action or result"
> 
> Maybe it sounds dumb but where is lyour struts.xml located?

In my Eclipse project, it's at the root of my "src" directory.  In the
WAR file, it goes into WEB-INF/classes.  If it wasn't found, I would be
seeing more serious errors.

> In your struts.xml your action named "main2" has no class.

Take that back :) .

Yes, I know that.  That's the point.  "main2" has no Action class, but
"main" does, and "main" fails for no obvious reason.

> can you post more of your code?

What else would you want to see?  There's really nothing else.

> On Wed, Mar 5, 2008 at 6:04 PM, Karr, David 
> <da...@wamu.net> wrote:
> 
> > > -----Original Message-----
> > > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > > Sent: Wednesday, March 05, 2008 3:11 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Simple helloworld test fails with "Could not find 
> > > action or result"
> > >
> > > I don't see anything wrong with it, provided MainAction returns 
> > > "success" (MainAction.java wasn't attached).
> >
> > Cute.  I guess my company decided that java is unsafe, so 
> they removed 
> > it from the attachments :) .  I'll reattach it with a fake extent.  
> > I'll also attach my JSP.  Perhaps that's relevant.
> >
> > The Action implementation extends ActionSupport, and it's using the 
> > SUCCESS constant.
> >
> > > Is it possible you have a conflicting struts.xml deployed in the 
> > > webapp, or any plugin jars deployed?  The only other time 
> I've seen 
> > > the response you're returning the correct result code is when the 
> > > Result implementation has encountered an error (not using the 
> > > CodeBehind plugin are you?)
> >
> > I have the following jars in WEB-INF/lib:
> >
> > spring-context-2.0.5.jar
> > spring-core-2.0.5.jar
> > commons-logging-1.0.4.jar
> > spring-web-2.0.5.jar
> > freemarker-2.3.8.jar
> > struts2-core-2.0.11.jar
> > ognl-2.6.11.jar
> > struts2-spring-plugin-2.0.11.jar
> > spring-beans-2.0.5.jar
> > xwork-2.0.4.jar
> >
> > I do have the Spring plugin in there.  Could that be an issue?  I'm 
> > going to want to use that soon, but I'm not really using it yet.
> >
> > I tried exporting my WAR and verifying I only have my single 
> > struts.xml in it.
> >
> > > What happen if your go directly to /main.action and /main2.action?
> >
> > That's what I've been doing.  When I go to "/main.action", 
> I get the 
> > error I described.
> >
> > > You have setup two actions:
> > >  main - implemented by MainAction, with a forward for 
> "success" to 
> > > /main.jsp
> > >  main2 - implemented by ActionSupport, with a forward for 
> "success" 
> > > to /main.jsp and you're using the default interceptors.  It is 
> > > configured correctly.
> > >
> > > Karr, David wrote:
> > > > I'm sure I have a simple error here, but I don't see it.
> > > >
> > > > I'm trying to construct a simple "hello, world" app with
> > > v2.0.11.  I
> > > > have an "index.jsp" that redirects to "main.action".  I started 
> > > > out with the "main" action just having a result
> > > (name="success") going to
> > > > "/main.jsp".  That appears to work.  I then cloned the 
> action (and 
> > > > changing the name), adding a "class" attribute referring to
> > > a simple
> > > > Action class.  The Action class' execute method just
> > > returns SUCCESS.
> > > > I would have thought this would do the same thing as the action 
> > > > without the Action class, but it instead fails with "No
> > > result defined
> > > > for action com.wamu.struts.helloworld.MainAction and result
> > > success".
> > > >
> > > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > > >
> > > >
> > > 
> --------------------------------------------------------------------
> > > --
> > > > --
> > > >
> > > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > 
> --------------------------------------------------------------------
> > > --
> > > > --
> > > >
> > > > No virus found in this incoming message.
> > > > Checked by AVG Free Edition.
> > > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
> > > > 5/03/2008 6:38 PM
> > >
> > >
> > > 
> --------------------------------------------------------------------
> > > - 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
> >
> 

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


Re: Simple helloworld test fails with "Could not find action or result"

Posted by Othon Reyes Sanchez <ot...@gmail.com>.
* I do have the Spring plugin in there.  Could that be an issue?  I'm
going to want to use that soon, but I'm not really using it yet.
*
Not, it is not a problem.

Maybe it sounds dumb but where is lyour struts.xml located?

In your struts.xml your action named "main2" has no class.

can you post more of your code?


On Wed, Mar 5, 2008 at 6:04 PM, Karr, David <da...@wamu.net> wrote:

> > -----Original Message-----
> > From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]
> > Sent: Wednesday, March 05, 2008 3:11 PM
> > To: Struts Users Mailing List
> > Subject: Re: Simple helloworld test fails with "Could not
> > find action or result"
> >
> > I don't see anything wrong with it, provided MainAction
> > returns "success" (MainAction.java wasn't attached).
>
> Cute.  I guess my company decided that java is unsafe, so they removed
> it from the attachments :) .  I'll reattach it with a fake extent.  I'll
> also attach my JSP.  Perhaps that's relevant.
>
> The Action implementation extends ActionSupport, and it's using the
> SUCCESS constant.
>
> > Is it possible you have a conflicting struts.xml deployed in
> > the webapp, or any plugin jars deployed?  The only other time
> > I've seen the response you're returning the correct result
> > code is when the Result implementation has encountered an
> > error (not using the CodeBehind plugin are you?)
>
> I have the following jars in WEB-INF/lib:
>
> spring-context-2.0.5.jar
> spring-core-2.0.5.jar
> commons-logging-1.0.4.jar
> spring-web-2.0.5.jar
> freemarker-2.3.8.jar
> struts2-core-2.0.11.jar
> ognl-2.6.11.jar
> struts2-spring-plugin-2.0.11.jar
> spring-beans-2.0.5.jar
> xwork-2.0.4.jar
>
> I do have the Spring plugin in there.  Could that be an issue?  I'm
> going to want to use that soon, but I'm not really using it yet.
>
> I tried exporting my WAR and verifying I only have my single struts.xml
> in it.
>
> > What happen if your go directly to /main.action and /main2.action?
>
> That's what I've been doing.  When I go to "/main.action", I get the
> error I described.
>
> > You have setup two actions:
> >  main - implemented by MainAction, with a forward for
> > "success" to /main.jsp
> >  main2 - implemented by ActionSupport, with a forward for
> > "success" to /main.jsp and you're using the default
> > interceptors.  It is configured correctly.
> >
> > Karr, David wrote:
> > > I'm sure I have a simple error here, but I don't see it.
> > >
> > > I'm trying to construct a simple "hello, world" app with
> > v2.0.11.  I
> > > have an "index.jsp" that redirects to "main.action".  I started out
> > > with the "main" action just having a result
> > (name="success") going to
> > > "/main.jsp".  That appears to work.  I then cloned the action (and
> > > changing the name), adding a "class" attribute referring to
> > a simple
> > > Action class.  The Action class' execute method just
> > returns SUCCESS.
> > > I would have thought this would do the same thing as the action
> > > without the Action class, but it instead fails with "No
> > result defined
> > > for action com.wamu.struts.helloworld.MainAction and result
> > success".
> > >
> > > I'll attach my struts.xml, web.xml, and MainAction.java files.
> > >
> > >
> > ----------------------------------------------------------------------
> > > --
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > ----------------------------------------------------------------------
> > > --
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
> > > 5/03/2008 6:38 PM
> >
> >
> > ---------------------------------------------------------------------
> > 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
>

RE: Simple helloworld test fails with "Could not find action or result"

Posted by "Karr, David" <da...@wamu.net>.
> -----Original Message-----
> From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
> Sent: Wednesday, March 05, 2008 3:11 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not 
> find action or result"
> 
> I don't see anything wrong with it, provided MainAction 
> returns "success" (MainAction.java wasn't attached).

Cute.  I guess my company decided that java is unsafe, so they removed
it from the attachments :) .  I'll reattach it with a fake extent.  I'll
also attach my JSP.  Perhaps that's relevant.

The Action implementation extends ActionSupport, and it's using the
SUCCESS constant. 

> Is it possible you have a conflicting struts.xml deployed in 
> the webapp, or any plugin jars deployed?  The only other time 
> I've seen the response you're returning the correct result 
> code is when the Result implementation has encountered an 
> error (not using the CodeBehind plugin are you?)

I have the following jars in WEB-INF/lib:

spring-context-2.0.5.jar
spring-core-2.0.5.jar
commons-logging-1.0.4.jar
spring-web-2.0.5.jar
freemarker-2.3.8.jar
struts2-core-2.0.11.jar
ognl-2.6.11.jar
struts2-spring-plugin-2.0.11.jar
spring-beans-2.0.5.jar
xwork-2.0.4.jar

I do have the Spring plugin in there.  Could that be an issue?  I'm
going to want to use that soon, but I'm not really using it yet.

I tried exporting my WAR and verifying I only have my single struts.xml
in it.

> What happen if your go directly to /main.action and /main2.action?

That's what I've been doing.  When I go to "/main.action", I get the
error I described.

> You have setup two actions:
>  main - implemented by MainAction, with a forward for 
> "success" to /main.jsp
>  main2 - implemented by ActionSupport, with a forward for 
> "success" to /main.jsp and you're using the default 
> interceptors.  It is configured correctly.
> 
> Karr, David wrote:
> > I'm sure I have a simple error here, but I don't see it.
> >
> > I'm trying to construct a simple "hello, world" app with 
> v2.0.11.  I 
> > have an "index.jsp" that redirects to "main.action".  I started out 
> > with the "main" action just having a result 
> (name="success") going to 
> > "/main.jsp".  That appears to work.  I then cloned the action (and 
> > changing the name), adding a "class" attribute referring to 
> a simple 
> > Action class.  The Action class' execute method just 
> returns SUCCESS.  
> > I would have thought this would do the same thing as the action 
> > without the Action class, but it instead fails with "No 
> result defined 
> > for action com.wamu.struts.helloworld.MainAction and result 
> success".
> >
> > I'll attach my struts.xml, web.xml, and MainAction.java files.
> >   
> > 
> ----------------------------------------------------------------------
> > --
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> ----------------------------------------------------------------------
> > --
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition. 
> > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 
> > 5/03/2008 6:38 PM
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


Re: Simple helloworld test fails with "Could not find action or result"

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I don't see anything wrong with it, provided MainAction returns 
"success" (MainAction.java wasn't attached).

Is it possible you have a conflicting struts.xml deployed in the webapp, 
or any plugin jars deployed?  The only other time I've seen the response 
you're returning the correct result code is when the Result 
implementation has encountered an error (not using the CodeBehind plugin 
are you?)

What happen if your go directly to /main.action and /main2.action?

You have setup two actions:
 main - implemented by MainAction, with a forward for "success" to 
/main.jsp
 main2 - implemented by ActionSupport, with a forward for "success" to 
/main.jsp
and you're using the default interceptors.  It is configured correctly.

Karr, David wrote:
> I'm sure I have a simple error here, but I don't see it.
>
> I'm trying to construct a simple "hello, world" app with v2.0.11.  I
> have an "index.jsp" that redirects to "main.action".  I started out with
> the "main" action just having a result (name="success") going to
> "/main.jsp".  That appears to work.  I then cloned the action (and
> changing the name), adding a "class" attribute referring to a simple
> Action class.  The Action class' execute method just returns SUCCESS.  I
> would have thought this would do the same thing as the action without
> the Action class, but it instead fails with "No result defined for
> action com.wamu.struts.helloworld.MainAction and result success".
>
> I'll attach my struts.xml, web.xml, and MainAction.java files.
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 5/03/2008 6:38 PM


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


Re: Simple helloworld test fails with "Could not find action or result"

Posted by Wes Wannemacher <we...@wantii.com>.
On Wed, 2008-03-05 at 14:48 -0800, Karr, David wrote:
> I'm sure I have a simple error here, but I don't see it.
> 
> I'm trying to construct a simple "hello, world" app with v2.0.11.  I
> have an "index.jsp" that redirects to "main.action".  I started out with
> the "main" action just having a result (name="success") going to
> "/main.jsp".  That appears to work.  I then cloned the action (and
> changing the name), adding a "class" attribute referring to a simple
> Action class.  The Action class' execute method just returns SUCCESS.  I
> would have thought this would do the same thing as the action without
> the Action class, but it instead fails with "No result defined for
> action com.wamu.struts.helloworld.MainAction and result success".
> 
> I'll attach my struts.xml, web.xml, and MainAction.java files.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

David,

First off, you don't need the <interceptors> section in your struts.xml
because you extended struts-default in your package. You get
defaultStack as your default interceptor stack. 

Second, the action didn't come through as an attachment. I don't know if
you forgot it, or if the list filtered it out... But, if your action
class doesn't extend ActionSupport, then you may not have the constant
ActionSupport.SUCCESS, which is "success" (notice the lowercase). If you
are returning "SUCCESS" in all caps, then, you don't have a result
mapped to it... Although the docs insist that you don't need to extend
ActionSupport, that it can be any ol' POJO, unless you have a business
reason for not extending ActionSupport, then you really should inherit
from it.

-Wes


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