Hi,
I am experiencing the exact same problems with some actions.
Simply renaming the action name apparently helps. It seems that actions
defined with a method attribute which are named like the action class minus
"Action" are causing troubles.

For example the following definitions fail for me (super class execute()
method is executed and then strangely no result is found):

<action name="upload"
class="org.gbif.provider.webapp.action.manage.UploadAction" method="upload">
    <result type="redirect-action">
        status
        ${rid}
    </result>
</action>

<action name="import"
class="org.gbif.provider.webapp.action.manage.ImportAction" method="upload">
    <result type="redirect-action">
        status
        ${rid}
    </result>
</action>


but if I change their names they work like a charm...
Looks like a struts problem to me.

I am using appfuse 2.0.2 which uses struts 2.0.11.1 I think
Markus

  



ulypses73 wrote:
> 
> Hi, I had the same problem.
> I solved renaming the action in struts.xml, that is 
> a.    Action name is changed from "deliveryTonnage" (IIRC)
> I think struts sometimes doesn't like some names.
> I don't know why.
> Bye
> 
> 
> 
> 
> Rob Hills wrote:
>> 
>> Hi Matt,
>> 
>> Thanks for the reply.
>> 
>> I'd tried previously with a debugger without success.
>> 
>> What it had told me is that nothing I could do would make Struts call my
>> list method, the superclass' execute() method 
>> was called instead.
>> 
>> In the end, I did the following and now it works.  Not sure whether all
>> changes were needed and I don't have the time to 
>> experiment now:
>> 
>> 1.   Changed my DeliveryTonnageAction class to lose the "list()" method and
>> override "execute()" and call my 
>> crosstab-building method from that.
>> 
>> 2.   Changed the Struts.xml definition to the following:
>>     <action name="tonnage" class="deliveryTonnageAction">
>>     <result>WEB-INF/pages/deliveryTonnageList.jsp</result>
>>     <result name="cancel" type="redirect">deliveries.html</result>
>>     </action>
>> 
>> What's different about two is:
>> 
>> a.   Action name is changed from "deliveryTonnage" (IIRC)
>> b.   removed the 'method="list"' attribute from the action tag so it
>> defaults to "execute()" (which is what it was doing 
>> anyway - I just went with the flow!
>> c.   Added the "cancel" result, because I needed that anyway.
>> 
>> Now it all works so I'm happy, though I'd be just that little bit happier
>> if I understood exactly what was wrong and how I 
>> fixed it :-(  Maybe later I'll have the time to experiment.
>> 
>> On 13 Jan 2008 at 20:17, Matt Raible wrote:
>> 
>>> I don't know what could be causing this - I'd suggest you run it
>>> though a debugger and see if that helps at all. If that doesn't help,
>>> you might try contacting the Struts user mailing list.
>>> 
>>> Matt
>>> 
>>> On 1/13/08, Rob Hills <[EMAIL PROTECTED]> wrote:
>>> > Hi All,
>>> >
>>> > Using AppFuse 2.0.1 + Struts2 + Hibernate
>>> >
>>> > I've posted a couple of times before on this problem and I've been
>>> picking away at it episodically myself, but with no progress.  It is
>>> > now the only significant issue outstanding in my project and I'm at a
>>> standstill with it so I'll have a shot at describing it differently
>>> > again in case it triggers something in someone's memory.
>>> >
>>> > The page in question, "deliveryTonnage.html" is required to display a
>>> crosstab of data from the database.  It is meant to be a
>>> > simple "read-only" report page with no requirement to edit any data. 
>>> It does need to receive some posted and/or url parameters to
>>> > scope the data being displayed.
>>> >
>>> > I have created an action class for my page.  It has a prepare() method
>>> and a list() method, which pulls the data from the db and
>>> > loads it into an appropriate structure for display.  I have also
>>> created an actionTest class which tests the list() method and which
>>> > passes without any problem.
>>> >
>>> > I've added the following to my struts.xml
>>> >
>>> > <action name="deliveryTonnage"
>>> class="au.com.myapp.webapp.action.DeliveryTonnageAction" method="list">
>>> >      <result>WEB-INF/pages/deliveryTonnageList.jsp</result>
>>> > </action>
>>> >
>>> > which is basically a direct copy of any one of numerous similar
>>> definitions I have for "list" screens in my app.
>>> >
>>> > However, when I run my application and try and access the
>>> "deliveryTonnage.html" page, I get the error "No result defined for
>>> > action au.com.myapp.webapp.action.DeliveryTonnageAction and result
>>> success".  What's more, the "list" method is never called,
>>> > the stack trace I get indicates that a superclass' "execute()" method
>>> is called instead.
>>> >
>>> > This makes me suspect that there is some problem with my definition
>>> for this action in struts.xml, but I have no idea what it is.
>>> > FWIW, I've tried adding a:
>>> >   <result name="success">...</result> tag inside my <action ..>
>>> definition without any success.
>>> >
>>> > On 20 Dec 2007 at 2:12, Rob Hills wrote:
>>> >
>>> > > Using AppFuse 2.0 + Struts2
>>> > >
>>> > > I've described this problem before but had no takers so either
>>> no-one
>>> > > has seen this before, or else I've not described the problem well
>>> > > enough.  It's becoming a major problem for me so I'll have another
>>> go at
>>> > > describing it.
>>> > >
>>> > > I have an Action that needs to pull some data from the DB,
>>> reorganise it
>>> > > into a cross-tabulation and then present it in a read-only display.
>>> > >
>>> > > I thought this would be simple.  I created an Action that extends
>>> > > BaseAction and has a public void prepare() method and a public
>>> String
>>> > > list() method.  There's also some getters and setters and a method
>>> that
>>> > > actually builds the list containing the data.
>>> > >
>>> > > I also have an ActionTest that calls the list method.
>>> > >
>>> > > In my Struts.xml file I have a simple entry like this:
>>> > >
>>> > > <action name="deliveryTonnage"
>>> > > class="au.com.myapp.webapp.action.DeliveryTonnageAction"
>>> method="list">
>>> > >     <result>WEB-INF/pages/deliveryTonnageList.jsp</result>
>>> > > </action>
>>> > >
>>> > > When I run my Action test, it passes.  If I step through it with a
>>> > > debugger, I see my data list being built and everything is good.
>>> > >
>>> > > However, when I go to the web container (Tomcat) and try and view my
>>> > > page "/deliveryTonnage.html" it throws the error "No result defined
>>> for
>>> > > action
>>> > > au.com.myapp.webapp.action.DeliveryTonnageAction and result
>>> success".
>>> > >
>>> > > When I step through with a debugger, I find that my Action class has
>>> no
>>> > > list() method visible there!  I went back and checked and it is
>>> Public.
>>> > > Also, the Action test calls this method OK.
>>> > >
>>> > > I've clean-compiled numerous times and I've also completely removed
>>> and
>>> > > redeployed the application to Tomcat numerous times.
>>> > >
>>> > > Why does my list() method disappear from my class inside the web
>>> container?
>>> >
>>> > I'd be really grateful for any pointers or suggestions, this one's
>>> driving me nuts!
>>> >
>>> > Alternatively, if anyone else has a working pattern for a "report"
>>> style page, I'd love to see it.  I've contemplated trying
>>> > JasperReports for this, but that seems a bit of overkill.
>> 
>> Cheers,
>> Rob Hills
>> Waikiki, Western Australia
>> Mobile +61 (412) 904-357
>> Fax: +61 (8) 9529-2137
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/No-result-defined-for-action-au.com.myapp.webapp.action.DeliveryTonnageAction-and-result-success-tp14308817s2369p20858129.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


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

Reply via email to