Apache Struts 2 Documentation > Home > Guides > Plugin Developers Guide > Convention Plugin > Converting application from Codebehind to Convention Plugin |
Previously in Codebehind: Given an action named AnExampleAction, a request to /anExample -> AnExampleAction.execute() -> > anExample-index.ftl Now in Convention: Given an action named AnExampleAction, a request to /an-example -> AnExampleAction.execute() -> an-example-index.ftl
Add these constants to struts.xml
<constant name="struts.convention.action.suffix" value="Controller"/> <constant name="struts.convention.action.mapAllMatches" value="true"/> <constant name="struts.convention.default.parent.package" value="rest-default"/> <constant name="struts.convention.package.locators" value="example"/>