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 2017/09/07 20:22:16 UTC

svn commit: r1807646 - in /axis/axis2/java/core/trunk/modules/webapp/src/main: java/org/apache/axis2/webapp/ webapp/WEB-INF/views/admin/

Author: veithen
Date: Thu Sep  7 20:22:15 2017
New Revision: 1807646

URL: http://svn.apache.org/viewvc?rev=1807646&view=rev
Log:
Don't put attributes in the session context that can be put in the request context.

Modified:
    axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java
    axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp
    axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp
    axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp
    axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp
    axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp

Modified: 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/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminActions.java Thu Sep  7 20:22:15 2017
@@ -104,10 +104,9 @@ final class AdminActions {
         }
     }
 
-    protected void populateSessionInformation(HttpServletRequest req) {
+    protected void populateRequestAttributes(HttpServletRequest req) {
         HashMap services = configContext.getAxisConfiguration().getServices();
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
+        req.setAttribute(Constants.SERVICE_MAP, services);
     }
 
     @Action(name=INDEX)
@@ -354,7 +353,7 @@ final class AdminActions {
         Map<String,AxisModule> modules = configContext.getAxisConfiguration().getModules();
 
         req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
 
 
         req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
@@ -446,7 +445,7 @@ final class AdminActions {
 
     @Action(name="selectServiceParaEdit")
     public View selectServiceParaEdit(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
         req.setAttribute("action", EDIT_SERVICE_PARAMETERS);
         return new View(SELECT_SERVICE_JSP_NAME);
@@ -454,7 +453,7 @@ final class AdminActions {
 
     @Action(name="listOperation")
     public View listOperation(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
         req.setAttribute("action", ENGAGE_TO_OPERATION);
         return new View(SELECT_SERVICE_JSP_NAME);
@@ -462,7 +461,7 @@ final class AdminActions {
 
     @Action(name=ACTIVATE_SERVICE)
     public View activateService(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         return new View("activateService.jsp");
     }
 
@@ -480,7 +479,7 @@ final class AdminActions {
 
     @Action(name=DEACTIVATE_SERVICE)
     public View deactivateService(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         return new View("deactivateService.jsp");
     }
 
@@ -526,7 +525,7 @@ final class AdminActions {
     @Action(name="listServiceGroups")
     public View listServiceGroups(HttpServletRequest req) {
         Iterator<AxisServiceGroup> serviceGroups = configContext.getAxisConfiguration().getServiceGroups();
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups);
 
         return new View("listServiceGroups.jsp");
@@ -534,7 +533,7 @@ final class AdminActions {
 
     @Action(name=LIST_SERVICES)
     public View listServices(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
                                       configContext.getAxisConfiguration().getFaultyServices());
 
@@ -625,7 +624,7 @@ final class AdminActions {
 
     @Action(name="selectService")
     public View selectService(HttpServletRequest req) {
-        populateSessionInformation(req);
+        populateRequestAttributes(req);
         req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
         req.setAttribute("action", VIEW_OPERATION_SPECIFIC_CHAINS);
         return new View(SELECT_SERVICE_JSP_NAME);

Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/SelectService.jsp Thu Sep  7 20:22:15 2017
@@ -53,7 +53,7 @@
         <td style="width: 35%">Select a Service :</td><td style="width:65%">
             <select name="axisService">
             <%
-                HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+                HashMap services = (HashMap)request.getAttribute(Constants.SERVICE_MAP);
                 Collection serviceCol =  services.values();
                 for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
                     AxisService axisService = (AxisService)iterator.next();
@@ -61,7 +61,6 @@
             %> <option value="<%=serviceName%>"><%=serviceName%></option>
              <%
                 }
-                request.getSession().setAttribute(Constants.SERVICE_MAP,null);
              %>
              </select>
            </td>

Modified: 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/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp Thu Sep  7 20:22:15 2017
@@ -35,7 +35,7 @@
   </tr>
   <tr>
   <%
-HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+HashMap services = (HashMap)request.getAttribute(Constants.SERVICE_MAP);
 Collection col = services.values();
 String html = "";
 int count = 0;
@@ -48,7 +48,6 @@ for (Iterator iterator = col.iterator();
 		html += axisServices.getName() + "</option>";
 	}
 }
-request.getSession().setAttribute(Constants.SERVICE_MAP,null);
 if (count > 0) {
 %>
   

Modified: 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/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp Thu Sep  7 20:22:15 2017
@@ -35,7 +35,7 @@
   </tr>
   <tr>
 <%
-HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+HashMap services = (HashMap)request.getAttribute(Constants.SERVICE_MAP);
 Collection col = services.values();
 String html = "";
 int count = 0;
@@ -48,7 +48,6 @@ for (Iterator iterator = col.iterator();
 		html += axisServices.getName() + "</option>";
 	}
 }
-request.getSession().setAttribute(Constants.SERVICE_MAP,null);
 if (count > 0) {
 %>
 

Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp Thu Sep  7 20:22:15 2017
@@ -86,7 +86,7 @@
                 <select name="axisService">
                     <%
 
-                        HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+                        HashMap services = (HashMap)request.getAttribute(Constants.SERVICE_MAP);
                         Collection serviceCol =  services.values();
                         for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
                             AxisService axisService = (AxisService)iterator.next();
@@ -98,7 +98,6 @@
                     <%
 
                        }
-                       request.getSession().setAttribute(Constants.SERVICE_MAP,null);
 
                     %>
                  </select>

Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp?rev=1807646&r1=1807645&r2=1807646&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp Thu Sep  7 20:22:15 2017
@@ -39,8 +39,7 @@
 <% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getAttribute(Constants.SERVICE_PATH) + "/";
 %>
 <%
-    HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP);
-    request.getSession().setAttribute(Constants.SERVICE_MAP, null);
+    HashMap serviceMap = (HashMap) request.getAttribute(Constants.SERVICE_MAP);
     Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
     boolean status = false;
     if (serviceMap != null && !serviceMap.isEmpty()) {