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]

Reply via email to