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