Hi Rob, 

Shouldn't that Struts XML snippet look like this?

<action name="deliveryTonnage" 
class="au.com.myapp.webapp.action.DeliveryTonnageAction"
method="list">
    <result name="success">/WEB-INF/pages/shiftList.jsp</result>
<!--
    <result>/WEB-INF/pages/deliveryTonnageList.jsp</result>
-->
</action>

Also I think all of my actions have at least 2 <result> tags, the other one 
being "input".

Hope that helps,
Nathan

----- "Rob Hills" <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> Using AppFuse 2.0 + Struts2
> 
> I've been building this app for a while and have successfully added a
> 
> number of Actions to it.
> 
> Many hours ago, I went through the steps of adding my latest Action 
> "DeliveryTonnageAction".  When I went to test it via the browser, I
> got 
> the error:
> 
> "No result defined for action 
> au.com.myapp.webapp.action.DeliveryTonnageAction and result success"
> 
> Initially I assumed I'd fat-fingered a definition somewhere but I've 
> since wasted hours on this trying to figure out what's wrong without 
> success.
> 
> I have a class "DeliveryTonnageAction" defined as follows (some bits 
> snipped to keep it as brief as possible):
> 
> package au.com.myapp.webapp.action;
> 
> import au.com.myapp.service.DeliveryManager;
> import com.opensymphony.xwork2.Preparable;
> 
> public class DeliveryTonnageAction extends BaseAction implements 
> Preparable {
>     private static final long serialVersionUID = 1L;
>     private DeliveryManager deliveryManager;
>     private LocalDate filterStartDate;
>     private LocalDate filterEndDate;
>     private Integer day;
> 
>     @Override
>     public void prepare() {
>         if (day == null) {
>             filterStartDate = new LocalDate();
>             filterEndDate = filterStartDate.plusDays(7);
>         } else {
>             filterStartDate = getUtility().getDateForDay(day);
>             filterEndDate = filterStartDate;
>         }
>     }
> 
>     /**
>      * Builds up the tonnageGrid object for display
>      * @return
>      */
>     public String list () {
>         buildTonnageGrid();
>         return SUCCESS;
>     }
> 
> }
> 
> I have the following in my struts.xml:
> 
> struts.xml
> <action name="deliveryTonnage" 
> class="au.com.myapp.webapp.action.DeliveryTonnageAction"
> method="list">
>     <result>/WEB-INF/pages/shiftList.jsp</result>
> <!--
>     <result>/WEB-INF/pages/deliveryTonnageList.jsp</result>
> -->
> </action>
> 
> Note, although the original jsp "deliveryTonnageList.jsp" exists, I 
> wondered if possible compile errors in its definition were causing my
> 
> problem so I've substituted another jsp "shiftList.jsp" which I know 
> works via its own Action (I've reconfirmed that since this bug has 
> turned up).
> 
> When I put "deliveryTonnage.html" in my browser, I know that my
> Action's 
> "prepare()" method is called and completes successfully, as I've put a
> 
> breakpoint in there and stepped through it in Eclipse.
> 
> I suspect I've completely overlooked something in my configuration,
> but 
> I have no idea what that is.  I went back through the Struts2 tutorial
> 
> on the AppFuse website, but can't see anything I've missed.
> 
> Can someone please either point out the obvious error I'm not seeing
> in 
> the above, or give me some suggestions about where else to look?
> 
> TIA,
> 
> Rob Hills
> Waikiki, Western Australia
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to