struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fran Hesser <fhes...@gmail.com>
Subject Convention plug-in, tiles, and no @Result annotation
Date Wed, 09 Dec 2009 13:34:15 GMT
Is there a way to use the convention plugin, and not specify the
@Result annotation for the action classes with the result being tiles
or will it only find .jsps and Freemarker templates?
When I run this code I get the dreaded:
com.opensymphony.xwork2.config.ConfigurationException@1199919 ==> No
result defined for action com.action.vehicle.ServiceMaintenanceAction
and result success

Here’s what I have:
Struts.xml:
<package name="default" extends="tiles-default">
<!-- Default to tiles result type -->
<result-types>
<result-type name="tiles"class="org.apache.struts2.views.tiles.TilesResult"
default="true" />
</result-types>
</package>
<package name="service" extends="default"/>

Tiles-def.xml:
<definition name="service-maintenance-success" extends="service.base">
<put-attribute name="pageName"     value="Service Maintenance"/>
<put-attribute name="templateName" value="exampleTemplate.css"/>
<put-attribute name="body"
value="/WEB-INF/jsp/tiles/vehicle/serviceMaintenance.jsp"/>
</definition>

ServiceMaintenanceAction Class:
@Action(value="/vehicle/service-maintenance")
    public String execute() {
        return SUCCESS;
}

package-info.java:
@ParentPackage("vehicle")


Thanks,
Franklin

package name="service" extends="default"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message