Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Name

Convention Plugin

Publisher

Apache Software Foundation

License

Open Source (ASL2)

Version

Bundled with Struts from 2.1 on

Homepage

http://cwiki.apache.org/confluence/display/WW/Convention+Plugin

Wiki Markup
{rate:title=Rating|theme=dynamic}

The Convention is

Excerpt

a code by convention and component plugin similar to the Codebehind and Zero-config plugins

.

Introduction

The Convention Plugin provides the following features:

  • Action location by package naming conventions
  • Result (JSP, FreeMarker, etc) location by naming conventions
  • Class name to URL naming convention
  • Package name to namespace convention
  • SEO compliant URLs (i.e. my-action rather than MyAction)
  • Action name overrides using annotations
  • Interceptor overrides using annotations
  • Namespace overrides using annotations
  • XWork package overrides using annotations
  • Default action and result handling (i.e. /products will try com.example.actions.Products as well as com.example.actions.products.Index)

The Convention Plugin should require no configuration to use. Many of the conventions can be controlled using configuration properties and many of the classes can be extended or overridden.