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

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

Reply via email to