Warning | ||
---|---|---|
| ||
Since 2.1 this plugin has been deprecated in favor of the Convention Plugin. See this page for details on how to port your application to the Convention plugin. |
Note |
---|
The Codebehind Plugin is experimental. Feedback is appreciated! |
Overview
The Codebehind Plugin
Excerpt |
---|
reduces mundane configuration by adding "Page Controller" conventions |
...
To use this plugin, simply copy its jar into your application. The plugin can be used to find default mappings and results.
Default Mappings
To better facilitate a code-behind development approach, the plugin will detect the case where the request has no defined Struts action mapping, yet there exists a corresponding page. It will then create a dummy action mapping referencing the default Action class (usually ActionSupport), allowing the page to be displayed normally. Additionally, the default interceptor stack for the configured package will be applied, bringing the workflow benefits of interceptor stacks to simple pages.
...
For example, if the request is for http://www.company.com/myapp/member/login.action
, the plugin will look for the following pages, in this order:
...
These two patterns are searched for each of the three default page extensions: jsp, vm, and ftl. For example, if the request is for http://www.company.com/myapp/member/login.action
, so that the action name is login
and the namespace is member
, and the Action class returned a code of success
, the plugin will look for the following pages, in this order:
...
Setting | Description | Default | Possible Values |
---|---|---|---|
| The default package to use for created Action mappings |
| Any existing package name |
| Whether to disable scanning the classpath for Action classes or not |
|
|
Installation
This plugin can be installed by copying the plugin jar into your application's /WEB-INF/lib
directory. No other files need to be copied or created.