mirror of
https://github.com/apache/struts.git
synced 2026-08-07 23:57:03 +00:00
WW-3943 adds support for REST plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1421096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -47,6 +47,11 @@
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
||||
+15
@@ -95,4 +95,19 @@ public class ActionNamesAction extends ActionSupport {
|
||||
actionNames = new TreeSet<String>(configHelper.getActionNames(namespace));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index action to support cooperation with REST plugin
|
||||
*
|
||||
* @return action result
|
||||
* @throws Exception
|
||||
*/
|
||||
public String index() throws Exception {
|
||||
return execute();
|
||||
}
|
||||
|
||||
public String redirect() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -83,6 +83,16 @@ public class ListValidatorsAction extends ActionSupport {
|
||||
return super.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Index action to support cooperation with REST plugin
|
||||
*
|
||||
* @return action result
|
||||
* @throws Exception
|
||||
*/
|
||||
public String index() throws Exception {
|
||||
return execute();
|
||||
}
|
||||
|
||||
protected void loadValidators() {
|
||||
Class value = getClassInstance();
|
||||
if ( value != null ) {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<result name="input" type="freemarker">/config-browser/error.ftl</result>
|
||||
</global-results>
|
||||
|
||||
<action name="index">
|
||||
<action name="index" class="org.apache.struts2.config_browser.ActionNamesAction" method="redirect">
|
||||
<result type="redirectAction">actionNames</result>
|
||||
</action>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user