geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r232431 - in /geronimo/trunk/applications: console-framework/src/webapp/WEB-INF/data/ console-standard/src/java/org/apache/geronimo/console/webmanager/ console-standard/src/webapp/WEB-INF/ console-standard/src/webapp/WEB-INF/view/webmanager...
Date Sat, 13 Aug 2005 06:33:46 GMT
Author: ammulder
Date: Fri Aug 12 23:33:38 2005
New Revision: 232431

URL: http://svn.apache.org/viewcvs?rev=232431&view=rev
Log:
Update the web management portlet (GERONIMO-862)
 - remove AJP/HTTP/HTTPS separation
 - fully implement edit, start, stop web connectors
 - still need more properties for SSL and stuff

Added:
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
  (with props)
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp
      - copied, changed from r231473, geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/editHTTP.jsp
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp
  (with props)
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp
  (with props)
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp
  (with props)
Removed:
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/AJP13ConnectorPortlet.java
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/HttpConnectorBean.java
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/HttpConnectorPortlet.java
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/HttpsConnectorBean.java
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/HttpsConnectorPortlet.java
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/ajp13/
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/editHTTP.jsp
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/http/
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/https/
Modified:
    geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/pageregistry.xml
    geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/portletentityregistry.xml
    geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml
    geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml

Modified: geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/pageregistry.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/pageregistry.xml?rev=232431&r1=232430&r2=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/pageregistry.xml
(original)
+++ geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/pageregistry.xml
Fri Aug 12 23:33:38 2005
@@ -121,20 +121,6 @@
             </fragment>
             <fragment name="row2" type="row">
                 <fragment name="col1" type="column">
-                    <fragment name="p2" type="portlet">
-                        <property name="portlet" value="5.19"/>
-                    </fragment>
-                </fragment>
-            </fragment>
-            <fragment name="row3" type="row">
-                <fragment name="col1" type="column">
-                    <fragment name="p3" type="portlet">
-                        <property name="portlet" value="5.20"/>
-                    </fragment>
-                </fragment>
-            </fragment>
-            <fragment name="row4" type="row">
-                <fragment name="col1" type="column">
                     <fragment name="p4" type="portlet">
                         <property name="portlet" value="5.21"/>
                     </fragment>

Modified: geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/portletentityregistry.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/portletentityregistry.xml?rev=232431&r1=232430&r2=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/portletentityregistry.xml
(original)
+++ geronimo/trunk/applications/console-framework/src/webapp/WEB-INF/data/portletentityregistry.xml
Fri Aug 12 23:33:38 2005
@@ -43,14 +43,8 @@
         <portlet id="18">
             <definition-id>console-standard.WebServerManager</definition-id>
         </portlet>
-        <portlet id="19">
-            <definition-id>console-standard.HTTPConnectorManager</definition-id>
-        </portlet>
-        <portlet id="20">
-            <definition-id>console-standard.HTTPSConnectorManager</definition-id>
-        </portlet>
         <portlet id="21">
-            <definition-id>console-standard.AJP13ConnectorManager</definition-id>
+            <definition-id>console-standard.ConnectorManager</definition-id>
         </portlet>
         <portlet id="22">
             <definition-id>console-standard.Deployment</definition-id>

Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java?rev=232431&r1=232430&r2=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
(original)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
Fri Aug 12 23:33:38 2005
@@ -25,6 +25,7 @@
 
 public class ConnectorInfo implements Serializable {
     private String description;
+    private String displayName;
     private String objectName;
     private String protocol;
     private int port;
@@ -50,8 +51,16 @@
         return objectName;
     }
 
+    public String getDisplayName() {
+        return displayName;
+    }
+
     public void setObjectName(String objectName) {
         this.objectName = objectName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
     }
 
     public int getPort() {

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=232431&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
(added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
Fri Aug 12 23:33:38 2005
@@ -0,0 +1,312 @@
+/**
+ *
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.geronimo.console.webmanager;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+import javax.portlet.PortletContext;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.j2ee.management.geronimo.WebContainer;
+import org.apache.geronimo.j2ee.management.geronimo.WebConnector;
+import org.apache.geronimo.jetty.JettyContainer;
+import org.apache.geronimo.jetty.JettyWebConnector;
+import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ConnectorPortlet extends GenericPortlet {
+    private final static Log log = LogFactory.getLog(ConnectorPortlet.class);
+
+    private PortletRequestDispatcher normalView;
+
+    private PortletRequestDispatcher maximizedView;
+
+    private PortletRequestDispatcher helpView;
+
+    protected PortletRequestDispatcher editHttpView;
+    protected PortletRequestDispatcher editHttpsView;
+
+    public void processAction(ActionRequest actionRequest,
+            ActionResponse actionResponse) throws PortletException, IOException {
+        String mode = actionRequest.getParameter("mode");
+        WebContainer container = PortletManager.getCurrentWebContainer(actionRequest);
+        String server = "generic";
+        if(container instanceof JettyContainer) {
+            server = "jetty";
+        }
+        actionResponse.setRenderParameter("server", server);
+        if(mode.equals("new")) {
+            // User selected to add a new connector, need to show criteria portlet
+            actionResponse.setRenderParameter("mode", "new");
+            String protocol = actionRequest.getParameter("protocol");
+            actionResponse.setRenderParameter("protocol", protocol);
+        } else if(mode.equals("add")) { // User just submitted the form to add a new connector
+            // Get submitted values
+            //todo: lots of validation
+            String protocol = actionRequest.getParameter("protocol");
+            String host = actionRequest.getParameter("host");
+            int port = Integer.parseInt(actionRequest.getParameter("port"));
+            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
+            Integer minThreads = getInteger(actionRequest, "minThreads");
+            String name = actionRequest.getParameter("name");
+            // Create and configure the connector
+            WebConnector connector = PortletManager.createWebConnector(actionRequest, name,
protocol, host, port);
+            connector.setMaxThreads(maxThreads);
+            // todo: more configurable HTTP/Jetty values
+            if(connector instanceof JettyWebConnector) {
+                if(minThreads != null) {
+                    ((JettyWebConnector)connector).setMinThreads(minThreads.intValue());
+                }
+            }
+            if(protocol.equals(WebContainer.PROTOCOL_HTTPS)) {
+                //todo: HTTPS values
+            }
+            // Start the connector
+            try {
+                ((GeronimoManagedBean)connector).startRecursive();
+            } catch (Exception e) {
+                log.error("Unable to start connector", e); //todo: get into rendered page
somehow?
+            }
+            actionResponse.setRenderParameter("mode", "list");
+        } else if(mode.equals("save")) { // User just submitted the form to update a connector
+            // Get submitted values
+            //todo: lots of validation
+            String host = actionRequest.getParameter("host");
+            int port = Integer.parseInt(actionRequest.getParameter("port"));
+            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
+            Integer minThreads = getInteger(actionRequest, "minThreads");
+            String objectName = actionRequest.getParameter("objectName");
+            // Identify and update the connector
+            WebConnector connector = null;
+            WebConnector all[] = PortletManager.getWebConnectors(actionRequest);
+            for (int i = 0; i < all.length; i++) {
+                WebConnector conn = all[i];
+                if(((GeronimoManagedBean)conn).getObjectName().equals(objectName)) {
+                    connector = conn;
+                    break;
+                }
+            }
+            if(connector != null) {
+                connector.setHost(host);
+                connector.setPort(port);
+                connector.setMaxThreads(maxThreads);
+                if(connector instanceof JettyWebConnector) {
+                    if(minThreads != null) {
+                        ((JettyWebConnector)connector).setMinThreads(minThreads.intValue());
+                    }
+                }
+            }
+            actionResponse.setRenderParameter("mode", "list");
+        } else if(mode.equals("start")) {
+            String objectName = actionRequest.getParameter("name");
+            // work with the current connector to start it.
+            WebConnector connector = null;
+            WebConnector all[] = PortletManager.getWebConnectors(actionRequest);
+            for (int i = 0; i < all.length; i++) {
+                WebConnector conn = all[i];
+                if(((GeronimoManagedBean)conn).getObjectName().equals(objectName)) {
+                    connector = conn;
+                    break;
+                }
+            }
+            if(connector != null) {
+                try {
+                    ((GeronimoManagedBean)connector).startRecursive();
+                } catch (Exception e) {
+                    log.error("Unable to start connector", e); //todo: get into rendered
page somehow?
+                }
+            }
+            else {
+                log.error("Incorrect connector reference"); //Replace this with correct error
processing
+            }
+            actionResponse.setRenderParameter("name", objectName);
+            actionResponse.setRenderParameter("mode", "list");
+        } else if(mode.equals("stop")) {
+            String objectName = actionRequest.getParameter("name");
+            // work with the current connector to stop it.
+            WebConnector connector = null;
+            WebConnector all[] = PortletManager.getWebConnectors(actionRequest);
+            for (int i = 0; i < all.length; i++) {
+                WebConnector conn = all[i];
+                if(((GeronimoManagedBean)conn).getObjectName().equals(objectName)) {
+                    connector = conn;
+                    break;
+                }
+            }
+            if(connector != null) {
+                try {
+                    ((GeronimoManagedBean)connector).stop();
+                } catch (Exception e) {
+                    log.error("Unable to stop connector", e); //todo: get into rendered page
somehow?
+                }
+            }
+            else {
+                log.error("Incorrect connector reference"); //Replace this with correct error
processing
+            }
+            actionResponse.setRenderParameter("name", objectName);
+            actionResponse.setRenderParameter("mode", "list");
+        } else if(mode.equals("edit")) {
+            String objectName = actionRequest.getParameter("name");
+            actionResponse.setRenderParameter("objectName", objectName);
+            actionResponse.setRenderParameter("mode", "edit");
+
+        } else if(mode.equals("delete")) { // User chose to delete a connector
+            String objectName = actionRequest.getParameter("name");
+            PortletManager.getCurrentWebContainer(actionRequest).removeConnector(objectName);
+            actionResponse.setRenderParameter("mode", "list");
+        }
+    }
+
+    private Integer getInteger(ActionRequest actionRequest, String key) {
+        String value = actionRequest.getParameter(key);
+        if(value == null || value.equals("")) {
+            return null;
+        }
+        return new Integer(value);
+    }
+
+    protected void doView(RenderRequest renderRequest,
+            RenderResponse renderResponse) throws IOException, PortletException {
+        if (WindowState.MINIMIZED.equals(renderRequest.getWindowState())) {
+            return;
+        }
+        String mode = renderRequest.getParameter("mode");
+        if(mode == null || mode.equals("")) {
+            mode = "list";
+        }
+        renderRequest.setAttribute("server", renderRequest.getParameter("server"));
+        WebContainer container = PortletManager.getCurrentWebContainer(renderRequest);
+
+        if(mode.equals("new")) {
+            String protocol = renderRequest.getParameter("protocol");
+            renderRequest.setAttribute("maxThreads", "50");
+            if(container instanceof JettyWebConnector) {
+                renderRequest.setAttribute("minThreads", "10");
+            }
+            renderRequest.setAttribute("protocol", protocol);
+            renderRequest.setAttribute("mode", "add");
+            if(protocol.equals(WebContainer.PROTOCOL_HTTPS)) {
+                editHttpsView.include(renderRequest, renderResponse);
+            } else {
+                editHttpView.include(renderRequest, renderResponse);
+            }
+
+        } else if(mode.equals("edit")) {
+            String objectName = renderRequest.getParameter("objectName");
+            WebConnector connector = null;
+            WebConnector all[] = PortletManager.getWebConnectors(renderRequest);
+            for (int i = 0; i < all.length; i++) {
+                WebConnector conn = all[i];
+                if(((GeronimoManagedBean)conn).getObjectName().equals(objectName)) {
+                    connector = conn;
+                    break;
+                }
+            }
+            if(connector == null) {
+                doList(renderRequest, container, renderResponse);
+            } else {
+                renderRequest.setAttribute("objectName", objectName);
+                renderRequest.setAttribute("port", new Integer(connector.getPort()));
+                renderRequest.setAttribute("host", connector.getHost());
+                int maxThreads = connector.getMaxThreads();
+                renderRequest.setAttribute("maxThreads", Integer.toString(maxThreads));
+                if(connector instanceof JettyWebConnector) {
+                    int minThreads = ((JettyWebConnector)connector).getMinThreads();
+                    renderRequest.setAttribute("minThreads", String.valueOf(minThreads));
+                }
+                renderRequest.setAttribute("mode", "save");
+                if(connector.getProtocol().equals(WebContainer.PROTOCOL_HTTPS)) {
+                    editHttpsView.include(renderRequest, renderResponse);
+                } else {
+                    editHttpView.include(renderRequest, renderResponse);
+                }
+            }
+        } else if(mode.equals("list")) {
+            doList(renderRequest, container, renderResponse);
+        }
+    }
+
+    private void doList(RenderRequest renderRequest, WebContainer container, RenderResponse
renderResponse) throws PortletException, IOException {
+        List beans = new ArrayList();
+        WebConnector[] connectors = PortletManager.getWebConnectors(renderRequest);
+        for (int i = 0; i < connectors.length; i++) {
+            WebConnector connector = connectors[i];
+            ConnectorInfo info = new ConnectorInfo();
+                String objectName = ((GeronimoManagedBean)connector).getObjectName();
+                info.setObjectName(objectName);
+                info.setDescription(PortletManager.getGBeanDescription(renderRequest, objectName));
+                try {
+                    ObjectName realName = ObjectName.getInstance(objectName);
+                    info.setDisplayName(realName.getKeyProperty("name"));
+                } catch (MalformedObjectNameException e) {
+                    log.error("Bad object name for web connector", e);
+                    info.setDisplayName(info.getDescription());
+                }
+                info.setState(((GeronimoManagedBean)connector).getState());
+                info.setPort(connector.getPort());
+            try {
+                info.setProtocol(connector.getProtocol());
+            } catch (java.lang.IllegalStateException e) {
+                info.setProtocol("unknown");
+            }
+            beans.add(info);
+        }
+        renderRequest.setAttribute("connectors", beans);
+        renderRequest.setAttribute("protocols", container.getSupportedProtocols());
+
+        if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
+            normalView.include(renderRequest, renderResponse);
+        } else {
+            maximizedView.include(renderRequest, renderResponse);
+        }
+    }
+
+    protected void doHelp(RenderRequest renderRequest,
+            RenderResponse renderResponse) throws PortletException, IOException {
+        helpView.include(renderRequest, renderResponse);
+    }
+
+    public void init(PortletConfig portletConfig) throws PortletException {
+        super.init(portletConfig);
+        PortletContext pc = portletConfig.getPortletContext();
+        normalView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/normal.jsp");
+        maximizedView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/maximized.jsp");
+        helpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/help.jsp");
+        editHttpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
+        editHttpsView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
//todo: HTTPS args
+    }
+
+    public void destroy() {
+        normalView = null;
+        maximizedView = null;
+        super.destroy();
+    }
+}

Propchange: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml?rev=232431&r1=232430&r2=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml (original)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml Fri Aug 12
23:33:38 2005
@@ -266,10 +266,10 @@
 
     <portlet>
         <description>Portlet for managing Network Listeners</description>
-        <portlet-name>AJP13ConnectorManager</portlet-name>
+        <portlet-name>ConnectorManager</portlet-name>
         <display-name>Network Listener Portlet</display-name>
 
-        <portlet-class>org.apache.geronimo.console.webmanager.AJP13ManagerPortlet</portlet-class>
+        <portlet-class>org.apache.geronimo.console.webmanager.ConnectorPortlet</portlet-class>
 
         <expiration-cache>-1</expiration-cache>
 

Copied: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp
(from r231473, geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/editHTTP.jsp)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp?p2=geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp&p1=geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/editHTTP.jsp&r1=231473&r2=232431&rev=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/editHTTP.jsp
(original)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp
Fri Aug 12 23:33:38 2005
@@ -5,6 +5,9 @@
 <form name="<portlet:namespace/>" action="<portlet:actionURL/>">
 <input type="hidden" name="mode" value="${mode}">
 <input type="hidden" name="protocol" value="${protocol}">
+<c:if test="${mode eq 'save'}">
+  <input type="hidden" name="objectName" value="${objectName}">
+</c:if>
 <table width="100%%"  border="0">
 
 <!-- Name Field -->

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp?rev=232431&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp
(added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp
Fri Aug 12 23:33:38 2005
@@ -0,0 +1 @@
+The Connector Manager displays connections of all types and provide the capability to modify
connections for this web server. 
\ No newline at end of file

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/help.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp?rev=232431&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp
(added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp
Fri Aug 12 23:33:38 2005
@@ -0,0 +1 @@
+<%@ include file="normal.jsp" %>
\ No newline at end of file

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/maximized.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp?rev=232431&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp
(added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp
Fri Aug 12 23:33:38 2005
@@ -0,0 +1,66 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>There are still updates necessary to this portlet --
+there should be a separate add/edit JSP with additional logic for HTTPS connectors.</p>
+
+<!-- Show existing connectors -->
+<c:if test="${empty(connectors)}">There are no Connectors defined</c:if>
+<c:if test="${!empty(connectors)}">
+<table width="100%">
+  <tr>
+    <td style="padding: 0 20px">
+          <tr>
+            <td class="DarkBackground">Name
+            <td class="DarkBackground" align="center">Protocol
+            <td class="DarkBackground" align="center">Port
+            <td class="DarkBackground" align="center">State
+            <td class="DarkBackground" align="center">Actions
+            <td class="DarkBackground" align="center">Type
+            </td>
+          </tr>
+<c:forEach var="info" items="${connectors}">
+          <tr>
+            <td>${info.displayName}</td>
+            <td>${info.protocol}</td>
+            <td>${info.port}</td>
+            <td>${info.stateName}</td>
+            <td>
+             <c:choose>
+               <c:when test="${info.stateName eq 'running'}">
+               <a href="<portlet:actionURL portletMode="view">
+                 <portlet:param name="mode" value="stop" />
+                 <portlet:param name="name" value="${info.objectName}" />
+               </portlet:actionURL>">stop</a>
+               </c:when>
+               <c:otherwise>
+               <a href="<portlet:actionURL portletMode="view">
+                 <portlet:param name="mode" value="start" />
+                 <portlet:param name="name" value="${info.objectName}" />
+               </portlet:actionURL>">start</a>
+               </c:otherwise>
+             </c:choose>
+               <a href="<portlet:actionURL portletMode="view">
+                 <portlet:param name="mode" value="edit" />
+                 <portlet:param name="name" value="${info.objectName}" />
+               </portlet:actionURL>">edit</a>
+               <a href="<portlet:actionURL portletMode="view">
+                 <portlet:param name="mode" value="delete" />
+                 <portlet:param name="name" value="${info.objectName}" />
+               </portlet:actionURL>">delete</a>
+             </td>
+            <td>${info.description}</td>
+          </tr>
+</c:forEach>
+</table>
+</c:if>
+
+<!-- Links to add new connectors -->
+<c:forEach var="protocol" items="${protocols}">
+<br />
+<a href="<portlet:actionURL portletMode="view">
+           <portlet:param name="mode" value="new" />
+           <portlet:param name="protocol" value="${protocol}" />
+         </portlet:actionURL>">Add new ${protocol} listener</a>
+</c:forEach>

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/normal.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml?rev=232431&r1=232430&r2=232431&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml (original)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml Fri Aug 12 23:33:38
2005
@@ -515,16 +515,16 @@
     </servlet>
     <servlet>
         <description>Automated generated Portlet Wrapper</description>
-        <display-name>Pluto Wrapper for AJP13 Connector Management Portlet</display-name>
-        <servlet-name>AJP13ConnectorManager</servlet-name>
+        <display-name>Pluto Wrapper for Connector Management Portlet</display-name>
+        <servlet-name>ConnectorManager</servlet-name>
         <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
         <init-param>
             <param-name>portlet-class</param-name>
-            <param-value>org.apache.geronimo.console.webmanager.AJP13ConnectorPortlet</param-value>
+            <param-value>org.apache.geronimo.console.webmanager.ConnectorPortlet</param-value>
         </init-param>
         <init-param>
             <param-name>portlet-guid</param-name>
-            <param-value>console-standard.AJP13ConnectorManager</param-value>
+            <param-value>console-standard.ConnectorManager</param-value>
         </init-param>
     </servlet>
     <servlet>
@@ -768,8 +768,8 @@
         <url-pattern>/HTTPSConnectorManager/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>AJP13ConnectorManager</servlet-name>
-        <url-pattern>/AJP13ConnectorManager/*</url-pattern>
+        <servlet-name>ConnectorManager</servlet-name>
+        <url-pattern>/ConnectorManager/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>JNDI</servlet-name>



Mime
View raw message