How can I tell to Struts 2 convention plugin to scan all subpackages of a package. I tried with this
<constant name="struts.convention.action.suffix" value="Controller" />
<constant name="struts.convention.package.locators.basePackage" value="fi.fpf.mvc" />
and this
<constant name="struts.convention.action.suffix" value="Controller" />
<constant name="struts.convention.package.locators.basePackage" value="fi.fpf.mvc.*" />
but they don't work. my actions end with "Controller"
suffix. Someone knows how to do it?
here's my struts.xml
:
<struts>
<constant name="struts.convention.exclude.parentClassLoader" value="true"/>
<constant name="struts.convention.action.fileProtocols" value="jar,vfs,vfsfile,vfszip"/>
<constant name="struts.convention.action.suffix" value="Controller" />
<constant name="struts.convention.package.locators.basePackage" value="fi.fpf.mvc" />
<package name="fpf-default" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
</package>
</struts>
and one action:
@Action("indexController")
public class IndexController extends ActionSupport{
private static final long serialVersionUID = -2613425890762568273L;
@Action(value="loadIndex", results={
@Result(name="indexView", location = "indexView", type="tiles")
})
public String loadIndex() {
return "indexView";
}
}