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 17:52:12 UTC
svn commit: r1745912 - in /axis/axis2/java/core/trunk/modules/webapp: conf/
src/main/java/org/apache/axis2/webapp/ src/main/webapp/WEB-INF/include/
src/main/webapp/WEB-INF/tags/ src/main/webapp/WEB-INF/views/admin/
Author: veithen
Date: Sat May 28 17:52:12 2016
New Revision: 1745912
URL: http://svn.apache.org/viewvc?rev=1745912&view=rev
Log:
Overhaul of the admin console:
- Separate mutating actions from non mutating actions. Eventually all mutating actions should become POST requests (see AXIS2-4764) and all non mutating actions GET requests.
- Modify mutating actions so that instead of returning a view, they redirect to non mutating actions after completion. This avoids the form resubmission problem.
- Introduce a mechanism to display status messages after a redirect.
- Improve naming consistency.
Added:
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java (with props)
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java (with props)
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag (with props)
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp
- copied, changed from r1745869, 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
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/InActivateService.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ServiceParaEdit.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingglobally.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoanoperation.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/EngageToServiceGroup.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServiceGroups.jsp
- copied unchanged from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ListServiceGroup.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp
- copied, changed from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewGlobalChains.jsp
- copied unchanged from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewGlobalHandlers.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewOperationSpecificChains.jsp
- copied unchanged from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewServiceHandlers.jsp
Removed:
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/EngageToServiceGroup.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/InActivateService.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ListServiceGroup.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ServiceParaEdit.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewGlobalHandlers.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewServiceHandlers.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deleteService.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/disengage.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingglobally.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoanoperation.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp
Modified:
axis/axis2/java/core/trunk/modules/webapp/conf/web.xml
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/java/org/apache/axis2/webapp/AxisAdminServlet.java
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp
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/upload.jsp
Modified: axis/axis2/java/core/trunk/modules/webapp/conf/web.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/conf/web.xml?rev=1745912&r1=1745911&r2=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/conf/web.xml (original)
+++ axis/axis2/java/core/trunk/modules/webapp/conf/web.xml Sat May 28 17:52:12 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/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=1745912&r1=1745911&r2=1745912&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 Sat May 28 17:52:12 2016
@@ -41,6 +41,7 @@ import org.apache.commons.fileupload.ser
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.xml.namespace.QName;
import java.io.File;
@@ -55,31 +56,27 @@ import java.util.Map;
*/
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;
@@ -109,20 +106,23 @@ final class AdminActions {
req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
}
- @Action(name="index")
- public View processIndex(HttpServletRequest req) {
- return new View(ADMIN_JSP_NAME);
+ @Action(name=INDEX)
+ public View index(HttpServletRequest req) {
+ return new View("admin.jsp");
}
// supported web operations
- @Action(name="welcome", authorizationRequired=false)
- public View processWelcome(HttpServletRequest req) {
+ @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 View processUpload(HttpServletRequest req) {
+ @Action(name=UPLOAD)
+ public View upload(HttpServletRequest req) {
String hasHotDeployment =
(String) configContext.getAxisConfiguration().getParameterValue("hotdeployment");
String hasHotUpdate =
@@ -130,11 +130,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")
+ 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();
@@ -151,8 +155,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;
@@ -168,29 +171,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());
}
}
- return new View("upload.jsp");
+ throw new ServletException("Invalid request");
}
@Action(name="login", authorizationRequired=false)
- public ActionResult processLogin(HttpServletRequest req) {
+ 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!");
- return new View(LOGIN_JSP_NAME);
+ return new Redirect(WELCOME).withParameter("failed", "true");
}
String adminUserName = (String) configContext.getAxisConfiguration().getParameter(
@@ -200,160 +199,152 @@ final class AdminActions {
if (username.equals(adminUserName) && password.equals(adminPassword)) {
req.getSession().setAttribute(Constants.LOGGED, "Yes");
- return new Redirect("index");
+ return new Redirect(INDEX);
} else {
- req.setAttribute("errorMessage", "Invalid auth credentials!");
- return new View(LOGIN_JSP_NAME);
+ return new Redirect(WELCOME).withParameter("failed", "true");
}
}
- @Action(name="editServicePara")
- public View processEditServicePara(HttpServletRequest req) throws AxisFault {
+ @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();
-
- for (Parameter parameter : axisOperation.getParameters()) {
- String para = req.getParameter(op_name + "_" + parameter.getName());
+ AxisService serviceTemp =
+ configContext.getAxisConfiguration().getServiceForActivation(serviceName);
+ if (serviceTemp.isActive()) {
- axisOperation.addParameter(new Parameter(parameter.getName(), para));
- }
- }
+ if (serviceName != null) {
+ req.getSession().setAttribute(Constants.SERVICE,
+ configContext.getAxisConfiguration().getService(
+ serviceName));
}
- req.setAttribute("status", "Parameters Changed Successfully.");
- req.getSession().removeAttribute(Constants.SERVICE);
} else {
- AxisService serviceTemp =
- configContext.getAxisConfiguration().getServiceForActivation(serviceName);
- if (serviceTemp.isActive()) {
-
- if (serviceName != null) {
- req.getSession().setAttribute(Constants.SERVICE,
- configContext.getAxisConfiguration().getService(
- serviceName));
+ req.setAttribute("status", "Service " + serviceName + " is not an active service" +
+ ". \n Only parameters of active services can be edited.");
+ }
+ return new View("editServiceParameters.jsp");
+ }
+
+ @Action(name="updateServiceParameters")
+ 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));
+ }
+
+ for (Iterator<AxisOperation> iterator = service.getOperations(); iterator.hasNext();) {
+ AxisOperation axisOperation = iterator.next();
+ String op_name = axisOperation.getName().getLocalPart();
+
+ for (Parameter parameter : axisOperation.getParameters()) {
+ String para = request.getParameter(op_name + "_" + parameter.getName());
+
+ axisOperation.addParameter(new Parameter(parameter.getName(), para));
}
- } else {
- req.setAttribute("status", "Service " + serviceName + " is not an active service" +
- ". \n Only parameters of active services can be edited.");
}
}
- return new View(SERVICE_PARA_EDIT_JSP_NAME);
+ return new Redirect(EDIT_SERVICE_PARAMETERS)
+ .withStatus(true, "Parameters Changed Successfully.")
+ .withParameter("axisService", serviceName);
}
- @Action(name="engagingGlobally")
- public View processEngagingGlobally(HttpServletRequest req) {
+ @Action(name=ENGAGE_GLOBALLY)
+ public View engageGlobally(HttpServletRequest req) {
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);
+ return new View("engageGlobally.jsp");
+ }
- 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());
- }
+ @Action(name="doEngageGlobally")
+ 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());
}
-
- req.getSession().setAttribute("modules", null);
- return new View(ENGAGING_MODULE_GLOBALLY_JSP_NAME);
}
- @Action(name="listOperations")
- public View processListOperations(HttpServletRequest req) throws AxisFault {
+ @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")
+ 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);
- return new View(ENGAGE_TO_OPERATION_JSP_NAME);
+ return redirect;
}
- @Action(name="engageToService")
- public View processEngageToService(HttpServletRequest req) {
+ @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);
- return new View(ENGAGING_MODULE_TO_SERVICE_JSP_NAME);
+ return new View("engageToService.jsp");
+ }
+
+ @Action(name="doEngageToService")
+ 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 View processEngageToServiceGroup(HttpServletRequest req) throws AxisFault {
+ @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);
@@ -362,36 +353,33 @@ 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);
- return new View(ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME);
+ return new View("engageToServiceGroup.jsp");
+ }
+
+ @Action(name="doEngageToServiceGroup")
+ 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 View processLogout(HttpServletRequest req) {
+ public Redirect logout(HttpServletRequest req) {
req.getSession().invalidate();
- return new View("index.jsp");
+ return new Redirect(WELCOME);
}
- @Action(name="viewServiceGroupConetxt")
- public View processviewServiceGroupConetxt(HttpServletRequest req) {
+ @Action(name="viewServiceGroupContext")
+ public View viewServiceGroupContext(HttpServletRequest req) {
String type = req.getParameter("TYPE");
String sgID = req.getParameter("ID");
ServiceGroupContext sgContext = configContext.getServiceGroupContext(sgID);
@@ -402,7 +390,7 @@ final class AdminActions {
}
@Action(name="viewServiceContext")
- public View processviewServiceContext(HttpServletRequest req) throws AxisFault {
+ public View viewServiceContext(HttpServletRequest req) throws AxisFault {
String type = req.getParameter("TYPE");
String sgID = req.getParameter("PID");
String ID = req.getParameter("ID");
@@ -420,62 +408,65 @@ final class AdminActions {
}
@Action(name="selectServiceParaEdit")
- public View processSelectServiceParaEdit(HttpServletRequest req) {
+ public View selectServiceParaEdit(HttpServletRequest req) {
populateSessionInformation(req);
req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
return new View(SELECT_SERVICE_JSP_NAME);
}
@Action(name="listOperation")
- public View processListOperation(HttpServletRequest req) {
+ public View listOperation(HttpServletRequest req) {
populateSessionInformation(req);
req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
return new View(SELECT_SERVICE_JSP_NAME);
}
- @Action(name="activateService")
- public View processActivateService(HttpServletRequest req) throws AxisFault {
- 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=ACTIVATE_SERVICE)
+ public View activateService(HttpServletRequest req) {
+ populateSessionInformation(req);
+ return new View("activateService.jsp");
+ }
+
+ @Action(name="doActivateService")
+ 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);
- return new View(ACTIVATE_SERVICE_JSP_NAME);
+ return new View("deactivateService.jsp");
}
- @Action(name="deactivateService")
- public View processDeactivateService(HttpServletRequest req) throws AxisFault {
- 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")
+ 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);
}
-
- return new View(IN_ACTIVATE_SERVICE_JSP_NAME);
+ return new Redirect(DEACTIVATE_SERVICE);
}
- @Action(name="viewGlobalHandlers")
- public View processViewGlobalHandlers(HttpServletRequest req) {
+ @Action(name="viewGlobalChains")
+ public View viewGlobalChains(HttpServletRequest req) {
req.getSession().setAttribute(Constants.GLOBAL_HANDLERS,
configContext.getAxisConfiguration());
- return new View(VIEW_GLOBAL_HANDLERS_JSP_NAME);
+ return new View("viewGlobalChains.jsp");
}
- @Action(name="viewServiceHandlers")
- public View processViewServiceHandlers(HttpServletRequest req) throws AxisFault {
+ @Action(name="viewOperationSpecificChains")
+ public View viewOperationSpecificChains(HttpServletRequest req) throws AxisFault {
String service = req.getParameter("axisService");
if (service != null) {
@@ -483,73 +474,73 @@ final class AdminActions {
configContext.getAxisConfiguration().getService(service));
}
- return new View(VIEW_SERVICE_HANDLERS_JSP_NAME);
+ return new View("viewOperationSpecificChains.jsp");
}
@Action(name="listPhases")
- public View processListPhases(HttpServletRequest req) {
+ public View listPhases(HttpServletRequest req) {
PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
req.getSession().setAttribute(Constants.PHASE_LIST, info);
- return new View(LIST_PHASES_JSP_NAME);
+ return new View("viewphases.jsp");
}
@Action(name="listServiceGroups")
- public View processListServiceGroups(HttpServletRequest req) {
+ public View listServiceGroups(HttpServletRequest req) {
Iterator<AxisServiceGroup> serviceGroups = configContext.getAxisConfiguration().getServiceGroups();
populateSessionInformation(req);
req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups);
- return new View(LIST_SERVICE_GROUP_JSP);
+ return new View("listServiceGroups.jsp");
}
- @Action(name="listService")
- public View processListService(HttpServletRequest req) {
+ @Action(name=LIST_SERVICES)
+ public View listServices(HttpServletRequest req) {
populateSessionInformation(req);
req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
configContext.getAxisConfiguration().getFaultyServices());
- return new View(LIST_SERVICES_JSP_NAME);
+ return new View("listServices.jsp");
}
@Action(name="listSingleService")
- public View processListSingleService(HttpServletRequest req) throws AxisFault {
+ 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);
}
- return new View(LIST_SINGLE_SERVICES_JSP_NAME);
+ return new View("listSingleService.jsp");
}
- @Action(name="listContexts")
- public View processListContexts(HttpServletRequest req) {
+ @Action(name="viewContexts")
+ public View viewContexts(HttpServletRequest req) {
req.getSession().setAttribute(Constants.CONFIG_CONTEXT, configContext);
- return new View("ViewContexts.jsp");
+ return new View("viewContexts.jsp");
}
@Action(name="globalModules")
- public View processglobalModules(HttpServletRequest req) {
+ public View globalModules(HttpServletRequest req) {
Collection<AxisModule> modules = configContext.getAxisConfiguration().getEngagedModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
- return new View(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME);
+ return new View("globalModules.jsp");
}
@Action(name="listModules")
- public View processListModules(HttpServletRequest req) {
+ 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());
- return new View(LIST_AVAILABLE_MODULES_JSP_NAME);
+ return new View("listModules.jsp");
}
@Action(name="disengageModule")
- public View processdisengageModule(HttpServletRequest req) throws AxisFault {
+ public Redirect processdisengageModule(HttpServletRequest req) throws AxisFault {
String type = req.getParameter("type");
String serviceName = req.getParameter("serviceName");
String moduleName = req.getParameter("module");
@@ -559,47 +550,42 @@ 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 + ".");
}
}
- return new View("disengage.jsp");
}
@Action(name="deleteService")
- public View processdeleteService(HttpServletRequest req) throws AxisFault {
+ 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.");
}
-
- return new View("deleteService.jsp");
}
@Action(name="selectService")
- public View processSelectService(HttpServletRequest req) {
+ public View selectService(HttpServletRequest req) {
populateSessionInformation(req);
req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java?rev=1745912&r1=1745911&r2=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java Sat May 28 17:52:12 2016
@@ -29,6 +29,8 @@ 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.util.HashMap;
@@ -55,24 +57,35 @@ public class AxisAdminServlet extends Ax
}
@Override
- protected void doGet(HttpServletRequest req,
- HttpServletResponse resp) throws ServletException, IOException {
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response) throws ServletException, IOException {
String action;
- String pathInfo = req.getPathInfo();
+ String pathInfo = request.getPathInfo();
if (pathInfo == null || pathInfo.isEmpty() || pathInfo.equals("/")) {
action = "index";
} else if (pathInfo.charAt(0) == '/') {
action = pathInfo.substring(1);
} else {
- resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
ActionHandler actionHandler = actionHandlers.get(action);
if (actionHandler != null) {
- req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath());
- ((ActionResult)actionHandler.handle(req, axisSecurityEnabled())).process(req, resp);
+ HttpSession session = request.getSession();
+ 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)actionHandler.handle(request, axisSecurityEnabled())).process(request, response);
} else {
- resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
}
Modified: 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/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java?rev=1745912&r1=1745911&r2=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Redirect.java Sat May 28 17:52:12 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());
}
}
Added: axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java?rev=1745912&view=auto
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java (added)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java Sat May 28 17:52:12 2016
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.webapp;
+
+import java.io.Serializable;
+
+public final class Status implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final boolean success;
+ private final String message;
+
+ public Status(boolean success, String message) {
+ this.success = success;
+ this.message = message;
+ }
+
+ public boolean isSuccess() {
+ return success;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+}
Propchange: axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/Status.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java?rev=1745912&view=auto
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java (added)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java Sat May 28 17:52:12 2016
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.webapp;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+
+final class StatusCache implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final Map<String,Status> entries = new LinkedHashMap<String,Status>() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected boolean removeEldestEntry(Entry<String,Status> eldest) {
+ return size() > 10;
+ }
+ };
+
+ synchronized String add(Status status) {
+ String key = UUID.randomUUID().toString();
+ entries.put(key, status);
+ return key;
+ }
+
+ synchronized Status get(String key) {
+ return entries.get(key);
+ }
+}
Propchange: axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/StatusCache.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp?rev=1745912&r1=1745911&r2=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/include/LeftFrame.jsp Sat May 28 17:52:12 2016
@@ -63,7 +63,7 @@
</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 @@
</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 @@
</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 @@
</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>
Added: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag?rev=1745912&view=auto
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag (added)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag Sat May 28 17:52:12 2016
@@ -0,0 +1,7 @@
+<%@ tag body-content="empty" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<c:if test="${not empty requestScope.status}">
+<p style="color: <c:out value="${requestScope.status.success ? 'green' : 'red'}"/>">
+<c:out value="${requestScope.status.message}"/>
+</p>
+</c:if>
Propchange: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/tags/status.tag
------------------------------------------------------------------------------
svn:eol-style = native
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=1745912&r1=1745911&r2=1745912&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 Sat May 28 17:52:12 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/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/activateService.jsp (from r1745869, 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?p2=axis/axis2/java/core/trunk/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=1745869&r2=1745912&rev=1745912&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 Sat May 28 17:52:12 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/activateService"/>">
+<form method="get" 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/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/InActivateService.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp?p2=axis/axis2/java/core/trunk/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/InActivateService.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/InActivateService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/deactivateService.jsp Sat May 28 17:52:12 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/deactivateService"/>">
+<form method="get" 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/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ServiceParaEdit.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp?p2=axis/axis2/java/core/trunk/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/ServiceParaEdit.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ServiceParaEdit.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/editServiceParameters.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ 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,
@@ -27,7 +28,8 @@
<%@ 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/editServicepara"/>">
+ <form method="get" name="editServicepara" action="<c:url value="axis2-admin/updateServiceParameters"/>">
+ <t:status/>
<%
AxisService axisService = (AxisService)request.getSession().
getAttribute(Constants.SERVICE);
@@ -112,10 +114,6 @@
</tr>
</table>
<%
- } else {
- %>
- <p><%=request.getAttribute("status")%></p>
- <%
}
%>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingglobally.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp?p2=axis/axis2/java/core/trunk/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/engagingglobally.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingglobally.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageGlobally.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ 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.AxisModule,
java.util.Collection,
@@ -25,21 +26,18 @@
java.util.Iterator" %>
<%@ page import="org.apache.axis2.util.Utils" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<%
- String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS);
-%>
<h1>Engage Module Globally</h1>
<p>To engage a module on all services across the system, select a module from the combo box below
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/engagingGlobally"/>">
+<form method="get" 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>
<td style="width: 75%" align="left">
- <select name="modules">
+ <select name="module">
<%
HashMap modules = (HashMap) request.getSession().getAttribute(Constants.MODULE_MAP);
request.getSession().setAttribute(Constants.MODULE_MAP,null);
@@ -63,10 +61,5 @@
</tr>
</table>
</form>
-<%
- if (status != null) {
-%>
-<p style="color:blue"><%=Utils.sanitizeWebOutput(status)%></p>
-<%
- } %>
+<t:status/>
<jsp:include page="/WEB-INF/include/adminfooter.jsp"/>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoanoperation.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp?p2=axis/axis2/java/core/trunk/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/engagingtoanoperation.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoanoperation.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToOperation.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants,
org.apache.axis2.description.AxisModule,
org.apache.axis2.description.AxisOperation,
@@ -26,9 +27,6 @@
java.util.HashMap,
java.util.Iterator"%>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<%
- String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
-%>
<h1>Engage Module for an Operation</h1>
<p>To engage a module for an axis operation,</p>
<ol>
@@ -37,7 +35,8 @@
<li>click "Engage".</li>
</ol>
-<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/listOperations"/>">
+<form method="get" 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>
<td>
@@ -50,7 +49,7 @@
</tr>
<tr>
<td>
- <select name="modules">
+ <select name="module">
<%
HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
request.getSession().setAttribute(Constants.MODULE_MAP,null);
@@ -115,13 +114,7 @@
</tr>
<tr>
<td>
- <textarea cols="50" <%
- if(status == null){
- %>
- style="display:none"
- <%
- } %>
- ><%=Utils.sanitizeWebOutput(status)%></textarea>
+ <t:status/>
</td>
</tr>
</table>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp?p2=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engagingtoaservice.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToService.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants,
org.apache.axis2.description.AxisModule,
org.apache.axis2.description.AxisService,
@@ -27,9 +28,6 @@
%>
<%@ page import="org.apache.axis2.util.Utils" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<%
- String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS);
-%>
<h1>Engage Module for a Service</h1>
<p>To engage a module for a axis service,</p>
@@ -40,7 +38,7 @@
<li>click "Engage".</li>
</ol>
-<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/engageToService"/>">
+<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageToService"/>">
<table summary="main content table" border="0" width="100%" cellspacing="1" cellpadding="1">
<tr>
<td>
@@ -53,7 +51,7 @@
</tr>
<tr>
<td>
- <select name="modules">
+ <select name="module">
<%
HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
@@ -131,19 +129,7 @@
</tr>
<tr>
<td>
- <textarea cols="50" rows="5" <%
- //if (status == null) {
- %>
- style="display:none"
- <%
- //} %>
- >
-
- <%--
- Following call causes exception so I commented out.
- <%=Utils.sanitizeWebOutput(status)%>
- --%>
- </textarea>
+ <t:status/>
</td>
</tr>
</table>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/EngageToServiceGroup.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp?p2=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/EngageToServiceGroup.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/EngageToServiceGroup.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/engageToServiceGroup.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants,
org.apache.axis2.description.AxisModule,
org.apache.axis2.description.AxisServiceGroup,
@@ -27,7 +28,6 @@
<%@ page import="org.apache.axis2.util.Utils" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
<%
- String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
request.getSession().setAttribute(Constants.MODULE_MAP,null);
Collection moduleCol = moduels.values();
@@ -52,14 +52,14 @@
<p>No Axis service groups are present to be engaged.</p>
<%} else {
%>
-<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/engageToServiceGroup"/>">
+<form method="get" name="selectModuleForm" action="<c:url value="axis2-admin/doEngageToServiceGroup"/>">
<table summary="main content table" border="0" width="100%" cellspacing="1" cellpadding="1">
<tr>
<td>Select a Module :</td>
</tr>
<tr>
<td>
- <select name="modules">
+ <select name="module">
<%
for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
AxisModule axisOperation = (AxisModule) iterator.next();
@@ -121,13 +121,7 @@
</tr>
<tr>
<td>
- <textarea cols="50" <%
- if(status == null){
- %>
- style="display:none"
- <%
- } %>
- ><%=Utils.sanitizeWebOutput(status)%></textarea>
+ <t:status/>
</td>
</tr>
</table>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp?p2=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listService.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/listServices.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ 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.AxisModule" %>
<%@ page import="org.apache.axis2.description.AxisOperation" %>
@@ -34,6 +35,7 @@
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
<h1>Available Services</h1>
+<t:status/>
<% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
%>
<%
Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/upload.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/upload.jsp?rev=1745912&r1=1745911&r2=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/upload.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/upload.jsp Sat May 28 17:52:12 2016
@@ -18,6 +18,7 @@
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
<script type="text/javascript">
@@ -41,22 +42,9 @@
</ul>
<p>Simple as that!</p>
-<% if ("success".equals(request.getAttribute("status"))) { %>
-<p style="color:green">
-File <%= request.getAttribute("filename") %> successfully uploaded
-</p>
-<%
-} else if ("failure".equals(request.getAttribute("status"))) {
-%>
-<p style="color:red">
-The following error occurred
-</p>
-<p style="color:red">
-<%= request.getAttribute("cause") %>
-</p>
-<% } %>
+<t:status/>
-<form method="post" name="Axis2upload" id="Axis2upload" action="<c:url value="axis2-admin/upload"/>"
+<form method="post" name="Axis2upload" id="Axis2upload" action="<c:url value="axis2-admin/doUpload"/>"
enctype="multipart/form-data">
<table summary="main content table">
<tr>
Copied: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp (from r1745869, axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp)
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp?p2=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp&p1=axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp&r1=1745869&r2=1745912&rev=1745912&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/ViewContexts.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/admin/viewContexts.jsp Sat May 28 17:52:12 2016
@@ -40,8 +40,8 @@
String groupContextID = serviceGroupIds[i];
ServiceGroupContext groupContext = configContext.getServiceGroupContext(groupContextID);
%>
- <li><%=groupContextID%><a style="color:blue" href="<c:url value="axis2-admin/viewServiceGroupConetxt"><c:param name="TYPE" value="VIEW"/><c:param name="ID" value="<%=groupContextID%>"/></c:url>">
- View</a> <a style="color:red" href="<c:url value="axis2-admin/viewServiceGroupConetxt"><c:param name="TYPE" value="DELETE"/><c:param name="ID" value="<%=groupContextID%>"/></c:url>">
+ <li><%=groupContextID%><a style="color:blue" href="<c:url value="axis2-admin/viewServiceGroupContext"><c:param name="TYPE" value="VIEW"/><c:param name="ID" value="<%=groupContextID%>"/></c:url>">
+ View</a> <a style="color:red" href="<c:url value="axis2-admin/viewServiceGroupContext"><c:param name="TYPE" value="DELETE"/><c:param name="ID" value="<%=groupContextID%>"/></c:url>">
Remove</a> </li>
<li>