You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2016/05/28 21:20:57 UTC

svn commit: r1745943 [1/2] - in /axis/axis2/java/core/branches/1_7: ./ modules/transport/http/src/org/apache/axis2/transport/http/ modules/webapp/ modules/webapp/conf/ modules/webapp/src/main/java/org/apache/axis2/webapp/ modules/webapp/src/main/webapp...

Author: veithen
Date: Sat May 28 21:20:57 2016
New Revision: 1745943

URL: http://svn.apache.org/viewvc?rev=1745943&view=rev
Log:
Merge recent admin console changes to the 1.7 branch. In particular, this includes the fix for AXIS2-4764.

Added:
    axis/axis2/java/core/branches/1_7/modules/webapp/conf/jetty.xml
      - copied unchanged from r1745826, axis/axis2/java/core/trunk/modules/webapp/conf/jetty.xml
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java
      - copied, changed from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java
      - copied, changed from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionResult.java
      - copied unchanged from r1745875, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionResult.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java
      - copied, changed from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/CSRFPreventionResponseWrapper.java
      - copied unchanged from r1745929, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/CSRFPreventionResponseWrapper.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/CSRFTokenCache.java
      - copied unchanged from r1745929, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/CSRFTokenCache.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java
      - copied, changed from r1745875, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/View.java
      - copied unchanged from r1745875, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/View.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/
      - copied from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/tags/
      - copied from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServiceGroups.jsp
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServiceGroups.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp
      - copied, changed from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewGlobalChains.jsp
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewGlobalChains.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewOperationSpecificChains.jsp
      - copied unchanged from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewOperationSpecificChains.jsp
Removed:
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ActivateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/EngageToServiceGroup.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/InActivateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ListServiceGroup.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ServiceParaEdit.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewGlobalHandlers.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewServiceHandlers.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deleteService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/disengage.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingglobally.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoanoperation.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ActivateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/EngageToServiceGroup.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/InActivateService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/LeftFrame.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ListServiceGroup.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/Login.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/SelectService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/TopFrame.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ViewGlobalHandlers.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/ViewServiceHandlers.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/admin.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/disengage.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/engagingglobally.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/engagingtoanoperation.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/engagingtoaservice.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/errorModule.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/globalModules.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/include/
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listModules.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listSingleService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/upload.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/viewphases.jsp
Modified:
    axis/axis2/java/core/branches/1_7/   (props changed)
    axis/axis2/java/core/branches/1_7/modules/transport/http/src/org/apache/axis2/transport/http/AbstractAgent.java
    axis/axis2/java/core/branches/1_7/modules/webapp/conf/web.xml
    axis/axis2/java/core/branches/1_7/modules/webapp/pom.xml
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/upload.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/Error/error404.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/Error/error500.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/HappyAxis.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/error.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/index.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listFaultyService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listGroupService.jsp
    axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/axis2-web/listServices.jsp

Propchange: axis/axis2/java/core/branches/1_7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 28 21:20:57 2016
@@ -1,4 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 /axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739815,1739826,1740693-1740694,1743824
+/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739815,1739826,1740693-1740694,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941

Modified: axis/axis2/java/core/branches/1_7/modules/transport/http/src/org/apache/axis2/transport/http/AbstractAgent.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/transport/http/src/org/apache/axis2/transport/http/AbstractAgent.java?rev=1745943&r1=1745942&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/transport/http/src/org/apache/axis2/transport/http/AbstractAgent.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/transport/http/src/org/apache/axis2/transport/http/AbstractAgent.java Sat May 28 21:20:57 2016
@@ -56,7 +56,8 @@ public class AbstractAgent {
             throws IOException, ServletException {
 
 
-        String requestURI = httpServletRequest.getRequestURI();
+        // Don't use getRequestURI() here because it includes the session ID
+        String requestURI = httpServletRequest.getServletPath() + httpServletRequest.getPathInfo();
 
         String operation;
         int i = requestURI.lastIndexOf('/');

Modified: axis/axis2/java/core/branches/1_7/modules/webapp/conf/web.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/conf/web.xml?rev=1745943&r1=1745942&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/webapp/conf/web.xml (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/conf/web.xml Sat May 28 21:20:57 2016
@@ -19,13 +19,15 @@
   ~ under the License.
   -->
 
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
+                             http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
     <display-name>Apache-Axis2</display-name>
     <servlet>
-        <servlet-name>AxisServlet</servlet-name>
         <display-name>Apache-Axis Servlet</display-name>
+        <servlet-name>AxisServlet</servlet-name>
         <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
         <!--<init-param>-->
         <!--<param-name>axis2.xml.path</param-name>-->
@@ -40,15 +42,14 @@
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
-        <servlet-name>AxisAdminServlet</servlet-name>
         <display-name>Apache-Axis AxisAdmin Servlet (Web Admin)</display-name>
-        <servlet-class>
-            org.apache.axis2.webapp.AxisAdminServlet</servlet-class>
+        <servlet-name>AxisAdminServlet</servlet-name>
+        <servlet-class>org.apache.axis2.webapp.AxisAdminServlet</servlet-class>
     </servlet>
     
     <!-- servlet>
-        <servlet-name>SOAPMonitorService</servlet-name>
         <display-name>SOAPMonitorService</display-name>
+        <servlet-name>SOAPMonitorService</servlet-name>
         <servlet-class>org.apache.axis2.soapmonitor.servlet.SOAPMonitorService</servlet-class>
         <init-param>
             <param-name>SOAPMonitorPort</param-name>

Modified: axis/axis2/java/core/branches/1_7/modules/webapp/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/pom.xml?rev=1745943&r1=1745942&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/webapp/pom.xml (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/pom.xml Sat May 28 21:20:57 2016
@@ -308,14 +308,15 @@
             </plugin>
             <plugin>
                 <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-                <version>6.1.22</version>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <version>8.1.16.v20140903</version>
                 <configuration>
                     <webXml>conf/web.xml</webXml>
+                    <contextXml>conf/jetty.xml</contextXml>
                     <webAppConfig>
                         <contextPath>/axis2</contextPath>
-                        <baseResource implementation="org.mortbay.resource.ResourceCollection">
-                            <resourcesAsCSV>src/main/webapp,${project.build.directory}/webResources</resourcesAsCSV>
+                        <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
+                            <resourcesAsCSV>${project.build.directory}/webResources,src/main/webapp</resourcesAsCSV>
                         </baseResource>
                     </webAppConfig>
                 </configuration>

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java (from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java&r1=1745860&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Action.java Sat May 28 21:20:57 2016
@@ -28,4 +28,5 @@ import java.lang.annotation.Target;
 @interface Action {
     String name();
     boolean authorizationRequired() default true;
+    boolean post() default false;
 }

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java (from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java&r1=1745860&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/ActionHandler.java Sat May 28 21:20:57 2016
@@ -24,7 +24,6 @@ import java.lang.reflect.Method;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 
 import org.apache.axis2.Constants;
 
@@ -32,19 +31,29 @@ final class ActionHandler {
     private final Object target;
     private final Method method;
     private final boolean authorizationRequired;
+    private final boolean post;
 
-    ActionHandler(Object target, Method method, boolean authorizationRequired) {
+    ActionHandler(Object target, Method method, boolean authorizationRequired, boolean post) {
         this.target = target;
         this.method = method;
         this.authorizationRequired = authorizationRequired;
+        this.post = post;
     }
 
-    void handle(HttpServletRequest request, HttpServletResponse response, boolean securityEnabled) throws IOException, ServletException {
+    boolean isMethodAllowed(String method) {
+        return post ? method.equals("POST") : method.equals("GET");
+    }
+
+    boolean isCSRFTokenRequired() {
+        return post && authorizationRequired;
+    }
+
+    ActionResult handle(HttpServletRequest request, boolean securityEnabled) throws IOException, ServletException {
         if (securityEnabled && authorizationRequired && request.getSession().getAttribute(Constants.LOGGED) == null) {
-            response.sendRedirect("welcome");
+            return new Redirect("welcome");
         } else {
             try {
-                method.invoke(target, request, response);
+                return (ActionResult)method.invoke(target, request);
             } catch (IllegalAccessException ex) {
                 throw new ServletException(ex);
             } catch (IllegalArgumentException ex) {

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java (from r1745860, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java&r1=1745860&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java Sat May 28 21:20:57 2016
@@ -25,6 +25,7 @@ import org.apache.axis2.context.Configur
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.deployment.util.PhasesInfo;
+import org.apache.axis2.description.AxisDescription;
 import org.apache.axis2.description.AxisModule;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -43,46 +44,41 @@ import org.apache.commons.logging.LogFac
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import javax.xml.namespace.QName;
 import java.io.File;
-import java.io.IOException;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 /**
  * Provides methods to process axis2 admin requests.
  */
 final class AdminActions {
     private static final Log log = LogFactory.getLog(AbstractAgent.class);
+    
+    private static final String WELCOME = "welcome";
+    private static final String INDEX = "index";
+    private static final String UPLOAD = "upload";
+    private static final String LIST_SERVICES = "listServices";
+    private static final String ENGAGE_GLOBALLY = "engageGlobally";
+    private static final String ENGAGE_TO_SERVICE_GROUP = "engageToServiceGroup";
+    private static final String ENGAGE_TO_SERVICE = "engageToService";
+    private static final String ENGAGE_TO_OPERATION = "engageToOperation";
+    private static final String DEACTIVATE_SERVICE = "deactivateService";
+    private static final String ACTIVATE_SERVICE = "activateService";
+    private static final String EDIT_SERVICE_PARAMETERS = "editServiceParameters";
+
     /**
      * Field LIST_MULTIPLE_SERVICE_JSP_NAME
      */
-    private static final String LIST_SERVICE_GROUP_JSP = "ListServiceGroup.jsp";
-    private static final String LIST_SERVICES_JSP_NAME = "listService.jsp";
-    private static final String LIST_SINGLE_SERVICES_JSP_NAME = "listSingleService.jsp";
     private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
-    private static final String IN_ACTIVATE_SERVICE_JSP_NAME = "InActivateService.jsp";
-    private static final String ACTIVATE_SERVICE_JSP_NAME = "ActivateService.jsp";
 
     /**
      * Field LIST_SINGLE_SERVICE_JSP_NAME
      */
-    private static final String LIST_PHASES_JSP_NAME = "viewphases.jsp";
-    private static final String LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME = "globalModules.jsp";
-    private static final String LIST_AVAILABLE_MODULES_JSP_NAME = "listModules.jsp";
-    private static final String ENGAGING_MODULE_TO_SERVICE_JSP_NAME = "engagingtoaservice.jsp";
-    private static final String ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME =
-            "EngageToServiceGroup.jsp";
-    private static final String ENGAGING_MODULE_GLOBALLY_JSP_NAME = "engagingglobally.jsp";
-    public static final String ADMIN_JSP_NAME = "admin.jsp";
-    private static final String VIEW_GLOBAL_HANDLERS_JSP_NAME = "ViewGlobalHandlers.jsp";
-    private static final String VIEW_SERVICE_HANDLERS_JSP_NAME = "ViewServiceHandlers.jsp";
-    private static final String SERVICE_PARA_EDIT_JSP_NAME = "ServiceParaEdit.jsp";
-    private static final String ENGAGE_TO_OPERATION_JSP_NAME = "engagingtoanoperation.jsp";
     private static final String LOGIN_JSP_NAME = "Login.jsp";
 
     private final ConfigurationContext configContext;
@@ -106,35 +102,29 @@ final class AdminActions {
         }
     }
 
-    protected void renderView(String jspName, HttpServletRequest httpServletRequest,
-            HttpServletResponse httpServletResponse) throws IOException, ServletException {
-        httpServletResponse.setContentType("text/html");
-        httpServletRequest.getRequestDispatcher(Constants.AXIS_WEB_CONTENT_ROOT + jspName)
-                .include(httpServletRequest, httpServletResponse);
-    }
-
     protected void populateSessionInformation(HttpServletRequest req) {
         HashMap services = configContext.getAxisConfiguration().getServices();
         req.getSession().setAttribute(Constants.SERVICE_MAP, services);
         req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
     }
 
-    @Action(name="index")
-    public void processIndex(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
-        renderView(ADMIN_JSP_NAME, req, res);
+    @Action(name=INDEX)
+    public View index(HttpServletRequest req) {
+        return new View("admin.jsp");
     }
 
     // supported web operations
 
-    @Action(name="welcome", authorizationRequired=false)
-    public void processWelcome(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
-        renderView(LOGIN_JSP_NAME, req, res);
+    @Action(name=WELCOME, authorizationRequired=false)
+    public View welcome(HttpServletRequest req) {
+        if ("true".equals(req.getParameter("failed"))) {
+            req.setAttribute("errorMessage", "Invalid auth credentials!");
+        }
+        return new View(LOGIN_JSP_NAME);
     }
 
-    @Action(name="upload")
-    public void processUpload(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=UPLOAD)
+    public View upload(HttpServletRequest req) {
         String hasHotDeployment =
                 (String) configContext.getAxisConfiguration().getParameterValue("hotdeployment");
         String hasHotUpdate =
@@ -142,11 +132,15 @@ final class AdminActions {
         req.setAttribute("hotDeployment", (hasHotDeployment.equals("true")) ? "enabled"
                 : "disabled");
         req.setAttribute("hotUpdate", (hasHotUpdate.equals("true")) ? "enabled" : "disabled");
+        return new View("upload.jsp");
+    }
+
+    @Action(name="doUpload", post=true)
+    public Redirect doUpload(HttpServletRequest req) throws ServletException {
         RequestContext reqContext = new ServletRequestContext(req);
 
         boolean isMultipart = ServletFileUpload.isMultipartContent(reqContext);
         if (isMultipart) {
-
             try {
                 //Create a factory for disk-based file items
                 FileItemFactory factory = new DiskFileItemFactory();
@@ -163,8 +157,7 @@ final class AdminActions {
                         String fileExtesion = fileName;
                         fileExtesion = fileExtesion.toLowerCase();
                         if (!(fileExtesion.endsWith(".jar") || fileExtesion.endsWith(".aar"))) {
-                            req.setAttribute("status", "failure");
-                            req.setAttribute("cause", "Unsupported file type " + fileExtesion);
+                            return new Redirect(UPLOAD).withStatus(false, "Unsupported file type " + fileExtesion);
                         } else {
 
                             String fileNameOnly;
@@ -180,31 +173,25 @@ final class AdminActions {
 
                             File uploadedFile = new File(serviceDir, fileNameOnly);
                             item.write(uploadedFile);
-                            req.setAttribute("status", "success");
-                            req.setAttribute("filename", fileNameOnly);
+                            return new Redirect(UPLOAD).withStatus(true, "File " + fileNameOnly + " successfully uploaded");
                         }
                     }
                 }
             } catch (Exception e) {
-                req.setAttribute("status", "failure");
-                req.setAttribute("cause", e.getMessage());
-
+                return new Redirect(UPLOAD).withStatus(false, "The following error occurred: " + e.getMessage());
             }
         }
-        renderView("upload.jsp", req, res);
+        throw new ServletException("Invalid request");
     }
 
-    @Action(name="login", authorizationRequired=false)
-    public void processLogin(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="login", authorizationRequired=false, post=true)
+    public Redirect login(HttpServletRequest req) {
         String username = req.getParameter("userName");
         String password = req.getParameter("password");
 
         if ((username == null) || (password == null) || username.trim().length() == 0
                 || password.trim().length() == 0) {
-            req.setAttribute("errorMessage", "Invalid auth credentials!");
-            renderView(LOGIN_JSP_NAME, req, res);
-            return;
+            return new Redirect(WELCOME).withParameter("failed", "true");
         }
 
         String adminUserName = (String) configContext.getAxisConfiguration().getParameter(
@@ -214,168 +201,170 @@ final class AdminActions {
 
         if (username.equals(adminUserName) && password.equals(adminPassword)) {
             req.getSession().setAttribute(Constants.LOGGED, "Yes");
-            res.sendRedirect(res.encodeURL("index"));
-            renderView(ADMIN_JSP_NAME, req, res);
+            return new Redirect(INDEX);
         } else {
-            req.setAttribute("errorMessage", "Invalid auth credentials!");
-            renderView(LOGIN_JSP_NAME, req, res);
+            return new Redirect(WELCOME).withParameter("failed", "true");
         }
     }
 
-    @Action(name="editServicePara")
-    public void processEditServicePara(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=EDIT_SERVICE_PARAMETERS)
+    public View editServiceParameters(HttpServletRequest req) throws AxisFault {
         String serviceName = req.getParameter("axisService");
-        if (req.getParameter("changePara") != null) {
-            AxisService service = configContext.getAxisConfiguration().getService(serviceName);
-            if (service != null) {
-                for (Parameter parameter : service.getParameters()) {
-                    String para = req.getParameter(serviceName + "_" + parameter.getName());
-                    service.addParameter(new Parameter(parameter.getName(), para));
-                }
-
-                for (Iterator<AxisOperation> iterator = service.getOperations(); iterator.hasNext();) {
-                    AxisOperation axisOperation = iterator.next();
-                    String op_name = axisOperation.getName().getLocalPart();
+        AxisService service =
+                configContext.getAxisConfiguration().getServiceForActivation(serviceName);
+        if (service.isActive()) {
 
-                    for (Parameter parameter : axisOperation.getParameters()) {
-                        String para = req.getParameter(op_name + "_" + parameter.getName());
-
-                        axisOperation.addParameter(new Parameter(parameter.getName(), para));
-                    }
-                }
+            if (serviceName != null) {
+                req.getSession().setAttribute(Constants.SERVICE,
+                                              configContext.getAxisConfiguration().getService(
+                                                      serviceName));
+            }
+            req.setAttribute("serviceName", serviceName);
+            req.setAttribute("parameters", getParameters(service));
+            Map<String,Map<String,String>> operations = new TreeMap<String,Map<String,String>>();
+            for (Iterator<AxisOperation> it = service.getOperations(); it.hasNext(); ) {
+                AxisOperation operation = it.next();
+                operations.put(operation.getName().getLocalPart(), getParameters(operation));
             }
-            res.setContentType("text/html");
-            req.setAttribute("status", "Parameters Changed Successfully.");
-            req.getSession().removeAttribute(Constants.SERVICE);
+            req.setAttribute("operations", operations);
         } else {
-            AxisService serviceTemp =
-                    configContext.getAxisConfiguration().getServiceForActivation(serviceName);
-            if (serviceTemp.isActive()) {
-
-                if (serviceName != null) {
-                    req.getSession().setAttribute(Constants.SERVICE,
-                                                  configContext.getAxisConfiguration().getService(
-                                                          serviceName));
-                }
-            } else {
-                req.setAttribute("status", "Service " + serviceName + " is not an active service" +
-                        ". \n Only parameters of active services can be edited.");
-            }
+            req.setAttribute("status", "Service " + serviceName + " is not an active service" +
+                    ". \n Only parameters of active services can be edited.");
         }
-        renderView(SERVICE_PARA_EDIT_JSP_NAME, req, res);
+        return new View("editServiceParameters.jsp");
     }
 
-    @Action(name="engagingGlobally")
-    public void processEngagingGlobally(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
-        Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
+    private static Map<String,String> getParameters(AxisDescription description) {
+        Map<String,String> parameters = new TreeMap<String,String>();
+        for (Parameter parameter : description.getParameters()) {
+            if (parameter.getParameterType() != Parameter.OM_PARAMETER) {
+                parameters.put(parameter.getName(), parameter.getValue().toString());
+            }
+        }
+        return parameters;
+    }
 
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+    @Action(name="updateServiceParameters", post=true)
+    public Redirect updateServiceParameters(HttpServletRequest request) throws AxisFault {
+        String serviceName = request.getParameter("axisService");
+        AxisService service = configContext.getAxisConfiguration().getService(serviceName);
+        if (service != null) {
+            for (Parameter parameter : service.getParameters()) {
+                String para = request.getParameter(serviceName + "_" + parameter.getName());
+                service.addParameter(new Parameter(parameter.getName(), para));
+            }
 
-        String moduleName = req.getParameter("modules");
+            for (Iterator<AxisOperation> iterator = service.getOperations(); iterator.hasNext();) {
+                AxisOperation axisOperation = iterator.next();
+                String op_name = axisOperation.getName().getLocalPart();
 
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+                for (Parameter parameter : axisOperation.getParameters()) {
+                    String para = request.getParameter(op_name + "_" + parameter.getName());
 
-        if (moduleName != null) {
-            try {
-                configContext.getAxisConfiguration().engageModule(moduleName);
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                                              moduleName + " module engaged globally successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
+                    axisOperation.addParameter(new Parameter(parameter.getName(), para));
+                }
             }
         }
+        return new Redirect(EDIT_SERVICE_PARAMETERS)
+                .withStatus(true, "Parameters Changed Successfully.")
+                .withParameter("axisService", serviceName);
+    }
+
+    @Action(name=ENGAGE_GLOBALLY)
+    public View engageGlobally(HttpServletRequest req) {
+        Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
+
+        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
 
         req.getSession().setAttribute("modules", null);
-        renderView(ENGAGING_MODULE_GLOBALLY_JSP_NAME, req, res);
+        return new View("engageGlobally.jsp");
+    }
 
+    @Action(name="doEngageGlobally", post=true)
+    public Redirect doEngageGlobally(HttpServletRequest request) {
+        String moduleName = request.getParameter("module");
+        try {
+            configContext.getAxisConfiguration().engageModule(moduleName);
+            return new Redirect(ENGAGE_GLOBALLY).withStatus(true,
+                    moduleName + " module engaged globally successfully");
+        } catch (AxisFault axisFault) {
+            return new Redirect(ENGAGE_GLOBALLY).withStatus(false, axisFault.getMessage());
+        }
     }
 
-    @Action(name="listOperations")
-    public void processListOperations(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=ENGAGE_TO_OPERATION)
+    public View engageToOperation(HttpServletRequest req) throws AxisFault {
         Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
 
-        String moduleName = req.getParameter("modules");
-
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
         req.getSession().setAttribute("modules", null);
 
         String serviceName = req.getParameter("axisService");
 
         if (serviceName != null) {
-            req.getSession().setAttribute("service", serviceName);
-        } else {
-            serviceName = (String) req.getSession().getAttribute("service");
+            req.setAttribute("service", serviceName);
         }
 
         req.getSession().setAttribute(
                 Constants.OPERATION_MAP,
                 configContext.getAxisConfiguration().getService(serviceName).getOperations());
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-
-        String operationName = req.getParameter("axisOperation");
 
-        if ((serviceName != null) && (moduleName != null) && (operationName != null)) {
-            try {
-                AxisOperation od = configContext.getAxisConfiguration().getService(
-                        serviceName).getOperation(new QName(operationName));
+        req.getSession().setAttribute("operation", null);
+        return new View("engageToOperation.jsp");
+    }
 
-                od.engageModule(
-                        configContext.getAxisConfiguration().getModule(moduleName));
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                                              moduleName
-                                                      +
-                                                      " module engaged to the operation successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
-            }
+    @Action(name="doEngageToOperation", post=true)
+    public Redirect doEngageToOperation(HttpServletRequest request) {
+        String moduleName = request.getParameter("module");
+        String serviceName = request.getParameter("service");
+        String operationName = request.getParameter("axisOperation");
+        Redirect redirect = new Redirect(ENGAGE_TO_OPERATION).withParameter("axisService", serviceName);
+        try {
+            AxisOperation od = configContext.getAxisConfiguration().getService(
+                    serviceName).getOperation(new QName(operationName));
+            od.engageModule(configContext.getAxisConfiguration().getModule(moduleName));
+            redirect.withStatus(true, moduleName + " module engaged to the operation successfully");
+        } catch (AxisFault axisFault) {
+            redirect.withStatus(false, axisFault.getMessage());
         }
-
-        req.getSession().setAttribute("operation", null);
-        renderView(ENGAGE_TO_OPERATION_JSP_NAME, req, res);
+        return redirect;
     }
 
-    @Action(name="engageToService")
-    public void processEngageToService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=ENGAGE_TO_SERVICE)
+    public View engageToService(HttpServletRequest req) {
         Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
         populateSessionInformation(req);
 
-        String moduleName = req.getParameter("modules");
 
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
         req.getSession().setAttribute("modules", null);
 
-        String serviceName = req.getParameter("axisService");
-
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
 
-        if ((serviceName != null) && (moduleName != null)) {
-            try {
-                configContext.getAxisConfiguration().getService(serviceName).engageModule(
-                        configContext.getAxisConfiguration().getModule(moduleName));
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                                              moduleName
-                                                      +
-                                                      " module engaged to the service successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
-            }
-        }
-
         req.getSession().setAttribute("axisService", null);
-        renderView(ENGAGING_MODULE_TO_SERVICE_JSP_NAME, req, res);
+        return new View("engageToService.jsp");
+    }
+
+    @Action(name="doEngageToService", post=true)
+    public Redirect doEngageToService(HttpServletRequest request) {
+        String moduleName = request.getParameter("module");
+        String serviceName = request.getParameter("axisService");
+        try {
+            configContext.getAxisConfiguration().getService(serviceName).engageModule(
+                    configContext.getAxisConfiguration().getModule(moduleName));
+            return new Redirect(ENGAGE_TO_SERVICE).withStatus(true,
+                    moduleName + " module engaged to the service successfully");
+        } catch (AxisFault axisFault) {
+            return new Redirect(ENGAGE_TO_SERVICE).withStatus(false, axisFault.getMessage());
+        }
     }
 
-    @Action(name="engageToServiceGroup")
-    public void processEngageToServiceGroup(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=ENGAGE_TO_SERVICE_GROUP)
+    public View engageToServiceGroup(HttpServletRequest req) {
         Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
@@ -384,50 +373,44 @@ final class AdminActions {
 
         req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, services);
 
-        String moduleName = req.getParameter("modules");
-
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
         req.getSession().setAttribute("modules", null);
 
-        String serviceName = req.getParameter("axisService");
-
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
 
-        if ((serviceName != null) && (moduleName != null)) {
-            configContext.getAxisConfiguration().getServiceGroup(serviceName).engageModule(
-                    configContext.getAxisConfiguration().getModule(moduleName));
-            req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                                          moduleName
-                                                  +
-                                                  " module engaged to the service group successfully");
-        }
-
         req.getSession().setAttribute("axisService", null);
-        renderView(ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME, req, res);
+        return new View("engageToServiceGroup.jsp");
+    }
+
+    @Action(name="doEngageToServiceGroup", post=true)
+    public Redirect doEngageToServiceGroup(HttpServletRequest request) throws AxisFault {
+        String moduleName = request.getParameter("module");
+        String serviceName = request.getParameter("axisService");
+        configContext.getAxisConfiguration().getServiceGroup(serviceName).engageModule(
+                configContext.getAxisConfiguration().getModule(moduleName));
+        return new Redirect(ENGAGE_TO_SERVICE_GROUP).withStatus(true,
+                moduleName + " module engaged to the service group successfully");
     }
 
     @Action(name="logout")
-    public void processLogout(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public Redirect logout(HttpServletRequest req) {
         req.getSession().invalidate();
-        renderView("index.jsp", req, res);
+        return new Redirect(WELCOME);
     }
 
-    @Action(name="viewServiceGroupConetxt")
-    public void processviewServiceGroupConetxt(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="viewServiceGroupContext")
+    public View viewServiceGroupContext(HttpServletRequest req) {
         String type = req.getParameter("TYPE");
         String sgID = req.getParameter("ID");
         ServiceGroupContext sgContext = configContext.getServiceGroupContext(sgID);
         req.getSession().setAttribute("ServiceGroupContext",sgContext);
         req.getSession().setAttribute("TYPE",type);
         req.getSession().setAttribute("ConfigurationContext",configContext);
-        renderView("viewServiceGroupContext.jsp", req, res);
+        return new View("viewServiceGroupContext.jsp");
     }
 
     @Action(name="viewServiceContext")
-    public void processviewServiceContext(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View viewServiceContext(HttpServletRequest req) throws AxisFault {
         String type = req.getParameter("TYPE");
         String sgID = req.getParameter("PID");
         String ID = req.getParameter("ID");
@@ -441,73 +424,69 @@ final class AdminActions {
             req.setAttribute("ServiceContext",null);
             req.setAttribute("TYPE",type);
         }
-        renderView("viewServiceContext.jsp", req, res);
+        return new View("viewServiceContext.jsp");
     }
 
     @Action(name="selectServiceParaEdit")
-    public void processSelectServiceParaEdit(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View selectServiceParaEdit(HttpServletRequest req) {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
-        renderView(SELECT_SERVICE_JSP_NAME, req, res);
+        return new View(SELECT_SERVICE_JSP_NAME);
     }
 
     @Action(name="listOperation")
-    public void processListOperation(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View listOperation(HttpServletRequest req) {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
+        return new View(SELECT_SERVICE_JSP_NAME);
+    }
 
-        renderView(SELECT_SERVICE_JSP_NAME, req, res);
+    @Action(name=ACTIVATE_SERVICE)
+    public View activateService(HttpServletRequest req) {
+        populateSessionInformation(req);
+        return new View("activateService.jsp");
     }
 
-    @Action(name="activateService")
-    public void processActivateService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
-        if (req.getParameter("submit") != null) {
-            String serviceName = req.getParameter("axisService");
-            String turnon = req.getParameter("turnon");
-            if (serviceName != null) {
-                if (turnon != null) {
-                    configContext.getAxisConfiguration().startService(serviceName);
-                }
+    @Action(name="doActivateService", post=true)
+    public Redirect doActivateService(HttpServletRequest request) throws AxisFault {
+        String serviceName = request.getParameter("axisService");
+        String turnon = request.getParameter("turnon");
+        if (serviceName != null) {
+            if (turnon != null) {
+                configContext.getAxisConfiguration().startService(serviceName);
             }
         }
+        return new Redirect(ACTIVATE_SERVICE);
+    }
+
+    @Action(name=DEACTIVATE_SERVICE)
+    public View deactivateService(HttpServletRequest req) {
         populateSessionInformation(req);
-        renderView(ACTIVATE_SERVICE_JSP_NAME, req, res);
+        return new View("deactivateService.jsp");
     }
 
-    @Action(name="deactivateService")
-    public void processDeactivateService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
-        if (req.getParameter("submit") != null) {
-            String serviceName = req.getParameter("axisService");
-            String turnoff = req.getParameter("turnoff");
-            if (serviceName != null) {
-                if (turnoff != null) {
-                    configContext.getAxisConfiguration().stopService(serviceName);
-                }
-                populateSessionInformation(req);
+    @Action(name="doDeactivateService", post=true)
+    public Redirect doDeactivateService(HttpServletRequest request) throws AxisFault {
+        String serviceName = request.getParameter("axisService");
+        String turnoff = request.getParameter("turnoff");
+        if (serviceName != null) {
+            if (turnoff != null) {
+                configContext.getAxisConfiguration().stopService(serviceName);
             }
-        } else {
-            populateSessionInformation(req);
         }
-
-        renderView(IN_ACTIVATE_SERVICE_JSP_NAME, req, res);
+        return new Redirect(DEACTIVATE_SERVICE);
     }
 
-    @Action(name="viewGlobalHandlers")
-    public void processViewGlobalHandlers(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="viewGlobalChains")
+    public View viewGlobalChains(HttpServletRequest req) {
         req.getSession().setAttribute(Constants.GLOBAL_HANDLERS,
                                       configContext.getAxisConfiguration());
 
-        renderView(VIEW_GLOBAL_HANDLERS_JSP_NAME, req, res);
+        return new View("viewGlobalChains.jsp");
     }
 
-    @Action(name="viewServiceHandlers")
-    public void processViewServiceHandlers(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="viewOperationSpecificChains")
+    public View viewOperationSpecificChains(HttpServletRequest req) throws AxisFault {
         String service = req.getParameter("axisService");
 
         if (service != null) {
@@ -515,81 +494,73 @@ final class AdminActions {
                                           configContext.getAxisConfiguration().getService(service));
         }
 
-        renderView(VIEW_SERVICE_HANDLERS_JSP_NAME, req, res);
+        return new View("viewOperationSpecificChains.jsp");
     }
 
     @Action(name="listPhases")
-    public void processListPhases(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View listPhases(HttpServletRequest req) {
         PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
         req.getSession().setAttribute(Constants.PHASE_LIST, info);
-        renderView(LIST_PHASES_JSP_NAME, req, res);
+        return new View("viewphases.jsp");
     }
 
     @Action(name="listServiceGroups")
-    public void processListServiceGroups(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View listServiceGroups(HttpServletRequest req) {
         Iterator<AxisServiceGroup> serviceGroups = configContext.getAxisConfiguration().getServiceGroups();
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups);
 
-        renderView(LIST_SERVICE_GROUP_JSP, req, res);
+        return new View("listServiceGroups.jsp");
     }
 
-    @Action(name="listService")
-    public void processListService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name=LIST_SERVICES)
+    public View listServices(HttpServletRequest req) {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
                                       configContext.getAxisConfiguration().getFaultyServices());
 
-        renderView(LIST_SERVICES_JSP_NAME, req, res);
+        return new View("listServices.jsp");
     }
 
     @Action(name="listSingleService")
-    public void processListSingleService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View listSingleService(HttpServletRequest req) throws AxisFault {
         req.getSession().setAttribute(Constants.IS_FAULTY, ""); //Clearing out any old values.
         String serviceName = req.getParameter("serviceName");
         if (serviceName != null) {
             AxisService service = configContext.getAxisConfiguration().getService(serviceName);
             req.getSession().setAttribute(Constants.SINGLE_SERVICE, service);
         }
-        renderView(LIST_SINGLE_SERVICES_JSP_NAME, req, res);
+        return new View("listSingleService.jsp");
     }
 
-    @Action(name="listContexts")
-    public void processListContexts(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="viewContexts")
+    public View viewContexts(HttpServletRequest req) {
         req.getSession().setAttribute(Constants.CONFIG_CONTEXT, configContext);
-        renderView("ViewContexts.jsp", req, res);
+        return new View("viewContexts.jsp");
     }
 
     @Action(name="globalModules")
-    public void processglobalModules(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View globalModules(HttpServletRequest req) {
         Collection<AxisModule> modules = configContext.getAxisConfiguration().getEngagedModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
 
-        renderView(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME, req, res);
+        return new View("globalModules.jsp");
     }
 
     @Action(name="listModules")
-    public void processListModules(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View listModules(HttpServletRequest req) {
         Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
         req.getSession().setAttribute(Constants.ERROR_MODULE_MAP,
                                       configContext.getAxisConfiguration().getFaultyModules());
 
-        renderView(LIST_AVAILABLE_MODULES_JSP_NAME, req, res);
+        return new View("listModules.jsp");
     }
 
-    @Action(name="disengageModule")
-    public void processdisengageModule(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="disengageModule", post=true)
+    public Redirect processdisengageModule(HttpServletRequest req) throws AxisFault {
         String type = req.getParameter("type");
         String serviceName = req.getParameter("serviceName");
         String moduleName = req.getParameter("module");
@@ -599,52 +570,45 @@ final class AdminActions {
         if (type.equals("operation")) {
             if (service.isEngaged(module.getName()) ||
                     axisConfiguration.isEngaged(module.getName())) {
-                req.getSession().setAttribute("status", "Can not disengage module " + moduleName +
-                        ". This module is engaged at a higher level.");
+                return new Redirect(LIST_SERVICES).withStatus(false, "Can not disengage module "
+                        + moduleName + ". This module is engaged at a higher level.");
             } else {
                 String opName = req.getParameter("operation");
                 AxisOperation op = service.getOperation(new QName(opName));
                 op.disengageModule(module);
-                req.getSession()
-                        .setAttribute("status", "Module " + moduleName + " was disengaged from " +
-                                "operation " + opName + " in service " + serviceName + ".");
+                return new Redirect(LIST_SERVICES).withStatus(true,
+                        "Module " + moduleName + " was disengaged from " + "operation " + opName
+                                + " in service " + serviceName + ".");
             }
         } else {
             if (axisConfiguration.isEngaged(module.getName())) {
-                req.getSession()
-                        .setAttribute("status", "Can not disengage module " + moduleName + ". " +
-                                "This module is engaged at a higher level.");
+                return new Redirect(LIST_SERVICES).withStatus(false, "Can not disengage module "
+                        + moduleName + ". " + "This module is engaged at a higher level.");
             } else {
                 service.disengageModule(axisConfiguration.getModule(moduleName));
-                req.getSession()
-                        .setAttribute("status", "Module " + moduleName + " was disengaged from" +
-                                " service " + serviceName + ".");
+                return new Redirect(LIST_SERVICES).withStatus(true, "Module " + moduleName
+                        + " was disengaged from" + " service " + serviceName + ".");
             }
         }
-        renderView("disengage.jsp", req, res);
     }
 
-    @Action(name="deleteService")
-    public void processdeleteService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    @Action(name="deleteService", post=true)
+    public Redirect deleteService(HttpServletRequest req) throws AxisFault {
         String serviceName = req.getParameter("serviceName");
         AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
         if (axisConfiguration.getService(serviceName) != null) {
             axisConfiguration.removeService(serviceName);
-            req.getSession().setAttribute("status", "Service '" + serviceName + "' has been successfully removed.");
+            return new Redirect(LIST_SERVICES).withStatus(true, "Service '" + serviceName + "' has been successfully removed.");
         } else {
-            req.getSession().setAttribute("status", "Failed to delete service '" + serviceName + "'. Service doesn't exist.");
+            return new Redirect(LIST_SERVICES).withStatus(false, "Failed to delete service '" + serviceName + "'. Service doesn't exist.");
         }
-
-        renderView("deleteService.jsp", req, res);
     }
 
     @Action(name="selectService")
-    public void processSelectService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException {
+    public View selectService(HttpServletRequest req) {
         populateSessionInformation(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
 
-        renderView(SELECT_SERVICE_JSP_NAME, req, res);
+        return new View(SELECT_SERVICE_JSP_NAME);
     }
 }

Modified: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java?rev=1745943&r1=1745942&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java Sat May 28 21:20:57 2016
@@ -21,6 +21,7 @@ package org.apache.axis2.webapp;
 
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.transport.http.AxisServlet;
 
 import javax.servlet.ServletConfig;
@@ -28,7 +29,14 @@ import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
 import java.io.IOException;
+import java.lang.reflect.Method;
+import java.security.SecureRandom;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
 
 /**
  *
@@ -36,22 +44,62 @@ import java.io.IOException;
 public class AxisAdminServlet extends AxisServlet {
     private static final long serialVersionUID = -6740625806509755370L;
     
-    protected transient AdminAgent agent;
+    private final Random random = new SecureRandom();
+    private final Map<String,ActionHandler> actionHandlers = new HashMap<String,ActionHandler>();
 
-    @Override
-    protected void doPost(HttpServletRequest req, HttpServletResponse res)
-            throws ServletException, IOException {
-        doGet(req, res);
+    private boolean axisSecurityEnabled() {
+        Parameter parameter = configContext.getAxisConfiguration()
+                .getParameter(Constants.ADMIN_SECURITY_DISABLED);
+        return parameter == null || !"true".equals(parameter.getValue());
     }
 
     @Override
-    protected void doGet(HttpServletRequest req,
-                         HttpServletResponse resp) throws ServletException, IOException {
-        try {
-            req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
-            agent.handle(req, resp);
-        } catch (Exception e) {
-            throw new ServletException(e);
+    protected void service(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        String action;
+        String pathInfo = request.getPathInfo();
+        if (pathInfo == null || pathInfo.length() == 0 || pathInfo.equals("/")) {
+            action = "index";
+        } else if (pathInfo.charAt(0) == '/') {
+            action = pathInfo.substring(1);
+        } else {
+            response.sendError(HttpServletResponse.SC_NOT_FOUND);
+            return;
+        }
+        ActionHandler actionHandler = actionHandlers.get(action);
+        if (actionHandler != null) {
+            if (actionHandler.isMethodAllowed(request.getMethod())) {
+                HttpSession session = request.getSession();
+                CSRFTokenCache tokenCache = (CSRFTokenCache)session.getAttribute(CSRFTokenCache.class.getName());
+                if (tokenCache == null) {
+                    tokenCache = new CSRFTokenCache();
+                    session.setAttribute(CSRFTokenCache.class.getName(), tokenCache);
+                }
+                if (actionHandler.isCSRFTokenRequired()) {
+                    String token = request.getParameter("token");
+                    if (token == null || !tokenCache.isValid(token)) {
+                        response.sendError(HttpServletResponse.SC_FORBIDDEN, "No valid CSRF token found in request");
+                        return;
+                    }
+                }
+                session.setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
+                String statusKey = request.getParameter("status");
+                if (statusKey != null) {
+                    StatusCache statusCache = (StatusCache)session.getAttribute(StatusCache.class.getName());
+                    if (statusCache != null) {
+                        Status status = statusCache.get(statusKey);
+                        if (status != null) {
+                            request.setAttribute("status", status);
+                        }
+                    }
+                }
+                ActionResult result = actionHandler.handle(request, axisSecurityEnabled());
+                result.process(request, new CSRFPreventionResponseWrapper(response, actionHandlers, tokenCache, random));
+            } else {
+                response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
+            }
+        } else {
+            response.sendError(HttpServletResponse.SC_NOT_FOUND);
         }
     }
 
@@ -62,7 +110,22 @@ public class AxisAdminServlet extends Ax
         this.configContext =
                 (ConfigurationContext) servletContext.getAttribute(CONFIGURATION_CONTEXT);
         servletContext.setAttribute(this.getClass().getName(), this);
-        agent = new AdminAgent(configContext);
+        AdminActions actions = new AdminActions(configContext);
+        for (Method method : actions.getClass().getMethods()) {
+            Action actionAnnotation = method.getAnnotation(Action.class);
+            if (actionAnnotation != null) {
+                Class<?>[] parameterTypes = method.getParameterTypes();
+                if (parameterTypes.length != 1
+                        || parameterTypes[0] != HttpServletRequest.class
+                        || !ActionResult.class.isAssignableFrom(method.getReturnType())) {
+                    throw new ServletException("Invalid method signature");
+                }
+                actionHandlers.put(
+                        actionAnnotation.name(),
+                        new ActionHandler(actions, method, actionAnnotation.authorizationRequired(),
+                                actionAnnotation.post()));
+            }
+        }
         this.servletConfig = config;
     }
 

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java (from r1745875, axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java&r1=1745875&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java Sat May 28 21:20:57 2016
@@ -19,21 +19,59 @@
 package org.apache.axis2.webapp;
 
 import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 final class Redirect extends ActionResult {
     private final String action;
+    private final Map<String,String> parameters = new LinkedHashMap<String,String>();
+    private Status status;
 
     Redirect(String action) {
         this.action = action;
     }
 
+    Redirect withParameter(String name, String value) {
+        parameters.put(name, value);
+        return this;
+    }
+
+    Redirect withStatus(boolean success, String message) {
+        this.status = new Status(success, message);
+        return this;
+    }
+
     @Override
     void process(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
-        response.sendRedirect(response.encodeRedirectURL(action));
+        StringBuilder url = new StringBuilder(response.encodeRedirectURL(action));
+        if (status != null) {
+            HttpSession session = request.getSession();
+            StatusCache statusCache = (StatusCache)session.getAttribute(StatusCache.class.getName());
+            if (statusCache == null) {
+                statusCache = new StatusCache();
+            }
+            parameters.put("status", statusCache.add(status));
+            session.setAttribute(StatusCache.class.getName(), statusCache);
+        }
+        boolean first = true;
+        for (Map.Entry<String,String> parameter : parameters.entrySet()) {
+            if (first) {
+                url.append('?');
+                first = false;
+            } else {
+                url.append('&');
+            }
+            url.append(parameter.getKey());
+            url.append('=');
+            url.append(URLEncoder.encode(parameter.getValue(), "UTF-8"));
+        }
+        response.sendRedirect(url.toString());
     }
 }

Modified: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp?rev=1745943&r1=1745869&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp Sat May 28 21:20:57 2016
@@ -63,7 +63,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="<c:url value="axis2-admin/listService"/>">Available Services</a>
+      <a href="<c:url value="axis2-admin/listServices"/>">Available Services</a>
     </td>
  </tr>
  <tr>
@@ -108,7 +108,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="<c:url value="axis2-admin/viewGlobalHandlers"/>">Global Chains</a>
+         <a href="<c:url value="axis2-admin/viewGlobalChains"/>">Global Chains</a>
        </td>
     </tr>
     <tr>
@@ -129,7 +129,7 @@
         &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="<c:url value="axis2-admin/engagingGlobally"/>">For all Services</a>
+         <a href="<c:url value="axis2-admin/engageGlobally"/>">For all Services</a>
        </td>
     </tr>
      <tr>
@@ -199,7 +199,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="<c:url value="axis2-admin/listContexts"/>">View Hierarchy</a>
+         <a href="<c:url value="axis2-admin/viewContexts"/>">View Hierarchy</a>
        </td>
     </tr>
 </table>

Modified: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp?rev=1745943&r1=1745869&r2=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp Sat May 28 21:20:57 2016
@@ -33,18 +33,18 @@
       String heading = "";
       String disc = "";
       if(status != null && status.equals("MODULE")) {
-          action = "listOperations";
+          action = "engageToOperation";
           buttonName = " View Operations";
           heading = "Select a service to view operation specific chains";
           disc = "Select an Axis service from the combo and click on the 'View Operations' button to view operation specific Chains.";
       } else if(status != null && status.equals("VIEW")){
           buttonName = " View ";
-          action = "viewServiceHandlers";
+          action = "viewOperationSpecificChains";
           heading = "Select a service to view service handlers";
           disc = "Select an Axis service from the combo and click on the 'View' button to view service handlers.";
       } else if (status != null && status.equals("SERVICE_PARAMETER")){
           buttonName = " Edit Parameters ";
-          action = "editServicePara"; // Constants.EDIR_SERVICE_PARA;
+          action = "editServiceParameters"; // Constants.EDIR_SERVICE_PARA;
           heading = "Select a Service to Edit Parameters";
           disc = "Select an Axis service from the combo and click on the 'Edit Parameters' button to edit parameters.";
       }

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp (from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp&r1=1745912&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp Sat May 28 21:20:57 2016
@@ -26,7 +26,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="/WEB-INF/include/adminheader.jsp"/>
 <h1>Turn On Service</h1>
-<form method="get" name="serviceActivate" action="<c:url value="axis2-admin/doActivateService"/>">
+<form method="post" name="serviceActivate" action="<c:url value="axis2-admin/doActivateService"/>">
   <table summary="main content table" width="100%"  border="0">
 <tr>
   <td colspan="2" >

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp (from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp&r1=1745912&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp Sat May 28 21:20:57 2016
@@ -26,7 +26,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="/WEB-INF/include/adminheader.jsp"/>
 <h1>Deactivate Service</h1>
-<form method="get" name="serviceInActivate" action="<c:url value="axis2-admin/doDeactivateService"/>">
+<form method="post" name="serviceInActivate" action="<c:url value="axis2-admin/doDeactivateService"/>">
   <table summary="main content table" style="width: 100%"  border="0">
 <tr>
   <td colspan="2" >

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp (from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp&r1=1745912&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp Sat May 28 21:20:57 2016
@@ -19,103 +19,50 @@
 
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@ page import="org.apache.axis2.Constants,
-                 org.apache.axis2.description.AxisOperation,
-                 org.apache.axis2.description.AxisService,
-                 org.apache.axis2.description.Parameter,
-                 java.util.ArrayList,
-                 java.util.Iterator"%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="/WEB-INF/include/adminheader.jsp"/>
 <h1>Edit Service Parameters</h1>
-  <form method="get" name="editServicepara" action="<c:url value="axis2-admin/updateServiceParameters"/>">
-  <t:status/>
-   <%
-            AxisService axisService = (AxisService)request.getSession().
-                    getAttribute(Constants.SERVICE);
-             if(axisService != null ){
-   %>     <table summary="main content table" width="100%">
-
+<t:status/>
+<c:if test="${not empty requestScope.serviceName}">
+    <form method="post" action="<c:url value="axis2-admin/updateServiceParameters"/>">
+        <input type="hidden" name="axisService" value="<c:out value="${requestScope.serviceName}"/>">
+        <table summary="main content table" width="100%">
             <tr>
-                 <td colspan="2" ><b>
-           <%
-                 String servicName =  axisService.getName();
-                 %>Service Parameters :: <%=servicName%>
-                 </b></td>
-             </tr>
-             <tr>
-             <td colspan="2" ><input style="display:none"  name="axisService" value="<%=servicName%>"></td>
+                <td colspan="2" ><b>Service Parameters :: <c:out value="${requestScope.serviceName}"/></b></td>
             </tr>
-             <%
-                 ArrayList service_para = axisService.getParameters();
-                 for (int i = 0; i < service_para.size(); i++) {
-                     Parameter parameter = (Parameter) service_para.get(i);
-                     if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
-                         continue;
-                     }
-                     %>
-                     <tr>
-                     <td><%=parameter.getName()%></td>
-                     <td><input type="text" value="<%=parameter.getValue()%>"
-                           name="<%=(servicName + "_" + parameter.getName())%>" size="50">
-                           </td>
-                     </tr>
-                     <%
-                 }
-                Iterator operations =  axisService.getOperations();
-                if(operations.hasNext()){
-                    %>
+            <c:forEach items="${requestScope.parameters}" var="parameter">
+                <tr>
+                    <td><c:out value="${parameter.key}"/></td>
+                    <td><input type="text" name="<c:out value="${requestScope.serviceName}_${parameter.key}"/>" value="<c:out value="${parameter.value}"/>" size="50"></td>
+                </tr>
+            </c:forEach>
+            <c:if test="${not empty requestScope.operations}">
+                <tr>
+                    <td colspan="2">&nbsp</td>
+                </tr>
+                <tr>
+                   <td colspan="2"><b>Operation Parameters ::</b></td>
+                </tr>
+                <c:forEach items="${requestScope.operations}" var="operation">
                     <tr>
-                      <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
-                      <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+                        <td colspan="2">&nbsp</td>
                     </tr>
                     <tr>
-                       <td colspan="2" > <b>Operation Paramaters :: </b>
-                       </td>
+                        <td colspan="2"><b>Operation : <c:out value="${operation.key}"/></b></td>
                     </tr>
-                    <%
-                }
-
-                 ArrayList op_paras ;
-                        operations = axisService.getOperations();
-                 while (operations.hasNext()) {
-                     AxisOperation axisOperation = (AxisOperation) operations.next();
-                     String operationName = axisOperation.getName().getLocalPart();
-                     %>
-                     <tr>
-                       <td colspan="2" > &nbsp;&nbsp;&nbsp;&nbsp;</td>
-                     </tr>
-                     <tr>
-                       <td colspan="2" ><b>Operation : <%=operationName%></b></td>
-                     </tr>
-                    <%
-                     op_paras = axisOperation.getParameters();
-                     for (int i = 0; i < op_paras.size(); i++) {
-                         Parameter parameter = (Parameter) op_paras.get(i);
-                         if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
-                             continue;
-                         }
-                     %>
-                     <tr>
-                     <td><%=parameter.getName()%></td>
-                     <td><input type="text" value="<%=parameter.getValue()%>"
-                           name="<%=(operationName + "_" + parameter.getName())%>" size="50">
-                           </td>
-                     </tr>
-                     <%
-                  }
-                 }
-                 %>
-                 <tr>
-                    <td>&nbsp;</td>
-                <td>
-                     <input name="changePara" type="submit" value=" Change " >
-               </td>
-               </tr>
-                 </table>
-                 <%
-             }
-
-       %>
-       </form>
+                    <c:forEach items="${operation.value}" var="parameter">
+                        <tr>
+                            <td><c:out value="${parameter.key}"/></td>
+                            <td><input type="text" name="<c:out value="${operation.key}_${parameter.key}"/>" value="<c:out value="${parameter.value}"/>" size="50"></td>
+                        </tr>
+                    </c:forEach>
+                </c:forEach>
+            </c:if>
+            <tr>
+                <td>&nbsp;</td>
+                <td><input name="changePara" type="submit" value=" Change " ></td>
+            </tr>
+        </table>
+   </form>
+</c:if>
 <jsp:include page="/WEB-INF/include/adminfooter.jsp"/>

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp (from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp&r1=1745912&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp Sat May 28 21:20:57 2016
@@ -32,7 +32,7 @@
     and click on the "Engage" button. Any module that needs to place handlers into the pre-dispatch
     phase needs to be engaged globally.</p>
 
-<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageGlobally"/>">
+<form method="post" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageGlobally"/>">
     <table summary="main content table" border="0" style="width:100%" cellspacing="1" cellpadding="1">
         <tr>
             <td style="width: 15%">Select a Module :</td>

Copied: axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp (from r1745912, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp?p2=axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp&r1=1745912&r2=1745943&rev=1745943&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp (original)
+++ axis/axis2/java/core/branches/1_7/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp Sat May 28 21:20:57 2016
@@ -35,7 +35,7 @@
             <li>click "Engage".</li>
         </ol>
 
-<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageToOperation"/>">
+<form method="post" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageToOperation"/>">
 <input type="hidden" name="service" value="<c:out value="${requestScope.service}"/>">
 <table summary="main content table" border="0" width="100%" cellspacing="1" cellpadding="1">
     <tr>