Child pages
  • Converting application from Codebehind to Convention Plugin
Skip to end of metadata
Go to start of metadata

Changes required

  • Replace org.apache.struts2.config.Namespace with org.apache.struts2.convention.annotation.Namespace
  • Replace org.apache.struts2.config.Results with org.apache.struts2.convention.annotation.Results
  • Replace org.apache.struts2.config.Result with org.apache.struts2.convention.annotation.Result
  • Update @Result uses to use result name instead of Class<Result>
  • Update @Result uses to use location instead of value attribute
  • Update web.xml and remove Codebehind params from filter
  • Update CamelCase action results and references to match Convention. For example:

When REST plugin is used

Add these constants to struts.xml

  • No labels