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/10 22:11:37 UTC
svn commit: r1807974 - in
/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views:
admin/SelectService.jsp admin/activateService.jsp
admin/deactivateService.jsp admin/engageToService.jsp
admin/listServices.jsp listServices.jsp
Author: veithen
Date: Sun Sep 10 22:11:37 2017
New Revision: 1807974
URL: http://svn.apache.org/viewvc?rev=1807974&view=rev
Log:
Use c:forEach to iterate over services.
Modified:
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
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/listServices.jsp
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=1807974&r1=1807973&r2=1807974&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 Sun Sep 10 22:11:37 2017
@@ -25,7 +25,6 @@
java.util.Iterator"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<%
String buttonName="" ;
@@ -53,16 +52,9 @@
<tr>
<td style="width: 35%">Select a Service :</td><td style="width:65%">
<select name="axisService">
- <%
- HashMap services = (HashMap)pageContext.getAttribute("services");
- Collection serviceCol = services.values();
- for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
- AxisService axisService = (AxisService)iterator.next();
- String serviceName = axisService.getName();
- %> <option value="<%=serviceName%>"><%=serviceName%></option>
- <%
- }
- %>
+ <c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+ <option value="${service.name}"><c:out value="${service.name}"/></option>
+ </c:forEach>
</select>
</td>
</tr>
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=1807974&r1=1807973&r2=1807974&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 Sun Sep 10 22:11:37 2017
@@ -25,7 +25,6 @@
java.util.Iterator"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<h1>Turn On Service</h1>
<form method="post" name="serviceActivate" action="<c:url value="axis2-admin/doActivateService"/>">
<table summary="main content table" width="100%" border="0">
@@ -36,19 +35,20 @@
</tr>
<tr>
<%
-HashMap services = (HashMap)pageContext.getAttribute("services");
-Collection col = services.values();
String html = "";
int count = 0;
-
-for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- AxisService axisServices = (AxisService) iterator.next();
+%>
+<c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+<%
+ AxisService axisServices = (AxisService) pageContext.getAttribute("service");
if(!axisServices.isActive()){
count++;
html += "<option value='" + axisServices.getName() + "'>";
html += axisServices.getName() + "</option>";
}
-}
+%>
+</c:forEach>
+<%
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=1807974&r1=1807973&r2=1807974&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 Sun Sep 10 22:11:37 2017
@@ -25,7 +25,6 @@
java.util.Iterator"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<h1>Deactivate Service</h1>
<form method="post" name="serviceInActivate" action="<c:url value="axis2-admin/doDeactivateService"/>">
<table summary="main content table" style="width: 100%" border="0">
@@ -36,19 +35,20 @@
</tr>
<tr>
<%
-HashMap services = (HashMap)pageContext.getAttribute("services");
-Collection col = services.values();
String html = "";
int count = 0;
-
-for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- AxisService axisServices = (AxisService) iterator.next();
+%>
+<c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+<%
+ AxisService axisServices = (AxisService) pageContext.getAttribute("service");
if(axisServices.isActive()){
count++;
html += "<option value='" + axisServices.getName() + "'>";
html += axisServices.getName() + "</option>";
}
-}
+%>
+</c:forEach>
+<%
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=1807974&r1=1807973&r2=1807974&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 Sun Sep 10 22:11:37 2017
@@ -28,7 +28,6 @@
%>
<%@ page import="org.apache.axis2.util.Utils" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<h1>Engage Module for a Service</h1>
<p>To engage a module for a axis service,</p>
@@ -85,22 +84,9 @@
<tr>
<td>
<select name="axisService">
- <%
-
- HashMap services = (HashMap)pageContext.getAttribute("services");
- Collection serviceCol = services.values();
- for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
- AxisService axisService = (AxisService)iterator.next();
- String serviceName = axisService.getName();
-
- %>
- <option value="<%=serviceName%>"><%=serviceName%>
- </option>
- <%
-
- }
-
- %>
+ <c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+ <option value="${service.name}"><c:out value="${service.name}"/></option>
+ </c:forEach>
</select>
</td>
</tr>
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=1807974&r1=1807973&r2=1807974&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 Sun Sep 10 22:11:37 2017
@@ -30,24 +30,20 @@
<%@ page import="java.util.Iterator" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/WEB-INF/include/adminheader.jsp"/>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<h1>Available Services</h1>
<t:status/>
<% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getAttribute(Constants.SERVICE_PATH) + "/";
%>
<%
- HashMap serviceMap = (HashMap) pageContext.getAttribute("services");
Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
boolean status = false;
- if (serviceMap != null && !serviceMap.isEmpty()) {
- Iterator operations;
- String serviceName;
- Collection servicecol = serviceMap.values();
- for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
- AxisService axisService = (AxisService) iterator.next();
- operations = axisService.getOperations();
- serviceName = axisService.getName();
+%>
+<c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+<%
+ AxisService axisService = (AxisService) pageContext.getAttribute("service");
+ Iterator operations = axisService.getOperations();
+ String serviceName = axisService.getName();
%><h2><a style="color:blue" href="<%=prefix + axisService.getName()%>?wsdl"><%=serviceName%></a></h2>
<%
String serviceDescription = axisService.getDocumentation();
@@ -127,8 +123,9 @@ Service Status : <%=axisService.isActive
</ul>
<%
status = true;
- }
- }
+%>
+</c:forEach>
+<%
if (errornessservice != null) {
if (errornessservice.size() > 0) {
request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
Modified: axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/listServices.jsp
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/listServices.jsp?rev=1807974&r1=1807973&r2=1807974&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/listServices.jsp (original)
+++ axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/WEB-INF/views/listServices.jsp Sun Sep 10 22:11:37 2017
@@ -29,7 +29,6 @@
<%@ page import="java.util.Hashtable" %>
<%@ page import="java.util.Iterator" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<c:set var="services" value="${requestScope.configContext.axisConfiguration.services}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
@@ -45,12 +44,12 @@
<% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getAttribute(Constants.SERVICE_PATH) + "/";
%>
<%
- HashMap serviceMap = (HashMap) pageContext.getAttribute("services");
Hashtable errornessservice = (Hashtable) request.getAttribute(Constants.ERROR_SERVICE_MAP);
boolean status = false;
- if (serviceMap != null && !serviceMap.isEmpty()) {
- for (Iterator iterator = serviceMap.values().iterator(); iterator.hasNext();) {
- AxisService axisService = (AxisService) iterator.next();
+%>
+<c:forEach var="service" items="${requestScope.configContext.axisConfiguration.services.values()}">
+<%
+ AxisService axisService = (AxisService) pageContext.getAttribute("service");
if (!Utils.isHiddenService(axisService)) {
Iterator opItr = axisService.getOperations();
String serviceName = axisService.getName();
@@ -82,8 +81,9 @@
<%
status = true;
}
- }
- }
+%>
+</c:forEach>
+<%
if (errornessservice != null) {
if (errornessservice.size() > 0) {
request.setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);