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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to