geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r388236 [2/3] - in /geronimo/trunk: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-framework/src/webapp/WEB-INF/data/ applications/console-standard/ applications/console-standard/src/java/org/apach...
Date Thu, 23 Mar 2006 19:20:27 GMT
Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/CreateKeystoreHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/CreateKeystoreHandler.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/CreateKeystoreHandler.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/CreateKeystoreHandler.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,62 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.util.PortletManager;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * Handler for entering a password to unlock a keystore
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class CreateKeystoreHandler extends BaseKeystoreHandler {
+    public CreateKeystoreHandler() {
+        super(CREATE_KEYSTORE, "/WEB-INF/view/keystore/createKeystore.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        if(request.getParameter("filename") != null) {
+            request.setAttribute("filename", request.getParameter("filename"));
+        }
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String filename = request.getParameter("filename");
+        String password = request.getParameter("password");
+        if(filename == null || filename.equals("")) {
+            return getMode();
+        } else if(password == null) {
+            response.setRenderParameter("filename", filename);
+            return getMode();
+        }
+        PortletManager.getKeystoreManager(request).createKeystore(filename, password.toCharArray());
+
+        return LIST_MODE+BEFORE_ACTION;
+    }
+}

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

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/KeystoresPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/KeystoresPortlet.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/KeystoresPortlet.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/KeystoresPortlet.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.MultiPagePortlet;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+
+/**
+ * A portlet that deals with multiple keystores in Geronimo.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class KeystoresPortlet extends MultiPagePortlet {
+    public void init(PortletConfig config) throws PortletException {
+        super.init(config);
+        addHelper(new ListHandler(), config);
+        addHelper(new UnlockKeystoreHandler(), config);
+        addHelper(new CreateKeystoreHandler(), config);
+        addHelper(new ViewKeystoreHandler(), config);
+        addHelper(new UploadCertificateHandler(), config);
+        addHelper(new ConfirmCertificateHandler(), config);
+        addHelper(new ConfigureNewKeyHandler(), config);
+        addHelper(new ConfirmKeyHandler(), config);
+    }
+
+    protected String getModelJSPVariableName() {
+        return "model";
+    }
+
+    protected MultiPageModel getModel(PortletRequest request) {
+        return new BaseKeystoreHandler.KeystoreModel(request);
+    }
+}

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

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ListHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ListHandler.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ListHandler.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ListHandler.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.security.keystore.KeystoreManager;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * Handler for the keystore list screen.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class ListHandler extends BaseKeystoreHandler {
+    public ListHandler() {
+        super(LIST_MODE, "/WEB-INF/view/keystore/index.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        KeystoreManager manager = PortletManager.getKeystoreManager(request);
+        String[] names = manager.listKeystores();
+        PortletSession session = request.getPortletSession(true);
+        KeystoreData[] keystores = new KeystoreData[names.length];
+        for (int i = 0; i < names.length; i++) {
+            String name = names[i];
+            KeystoreData data = (KeystoreData) session.getAttribute(KEYSTORE_DATA_PREFIX+name);
+            if(data == null) {
+                data = new KeystoreData();
+                data.setInstance(manager.getKeystore(name));
+                session.setAttribute(KEYSTORE_DATA_PREFIX+name, data);
+            }
+            keystores[i] = data;
+        }
+        request.setAttribute("keystores", keystores);
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        return getMode()+BEFORE_ACTION;
+    }
+
+}

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

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,65 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.geronimo.console.MultiPageModel;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * Handler for entering a password to unlock a keystore
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class UnlockKeystoreHandler extends BaseKeystoreHandler {
+    public UnlockKeystoreHandler() {
+        super(UNLOCK_KEYSTORE_FOR_EDITING, "/WEB-INF/view/keystore/unlockKeystore.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = request.getParameter("id");
+        if(id != null) {
+            response.setRenderParameter("id", id);
+        } // else we hope this is after a failure and the actionAfterView took care of it below!
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        request.setAttribute("id", request.getParameter("id"));
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = request.getParameter("keystore");
+        String password = request.getParameter("password");
+        if(id == null || id.equals("")) {
+            return getMode(); // todo: this is bad; if there's no ID, then the form on the page is just not valid!
+        } else if(password == null) {
+            response.setRenderParameter("id", id);
+        }
+        KeystoreData data = ((KeystoreData) request.getPortletSession(true).getAttribute(KEYSTORE_DATA_PREFIX + id));
+        char[] storePass = password.toCharArray();
+        data.setPassword(storePass);
+        data.setCertificates(data.getInstance().listTrustCertificates(storePass));
+        data.setKeys(data.getInstance().listPrivateKeys(storePass));
+        return LIST_MODE+BEFORE_ACTION;
+    }
+}

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

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UploadCertificateHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UploadCertificateHandler.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UploadCertificateHandler.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/UploadCertificateHandler.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,81 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.geronimo.console.MultiPageModel;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Handler for entering a password to unlock a keystore
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class UploadCertificateHandler extends BaseKeystoreHandler {
+    public UploadCertificateHandler() {
+        super(UPLOAD_CERTIFICATE, "/WEB-INF/view/keystore/uploadCertificate.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = request.getParameter("id");
+        if(id != null) {
+            response.setRenderParameter("id", id);
+        } // else we hope this is after a failure and the actionAfterView took care of it below!
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        request.setAttribute("id", request.getParameter("id"));
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = getUploadFields().getProperty("id");
+        if(id == null) {
+            return LIST_MODE+BEFORE_ACTION;
+        }
+        String alias = getUploadFields().getProperty("alias");
+        if(alias == null) {
+            return getMode()+BEFORE_ACTION; //todo: some kind of error message
+        }
+        File certFile;
+        FileItem item = (FileItem) getUploadFiles().get("certificate");
+        if(item != null) {
+            certFile = File.createTempFile("geronimo", ".cert");
+            certFile.deleteOnExit();
+            try {
+                item.write(certFile);
+            } catch (Exception e) {
+                throw new PortletException("Unable to save uploaded file", e);
+            }
+        } else {
+            response.setRenderParameter("id", id);
+            return getMode()+BEFORE_ACTION;
+        }
+        response.setRenderParameter("id", id); // the Keystore
+        response.setRenderParameter("certificate", certFile.getAbsolutePath());
+        response.setRenderParameter("alias", alias);
+
+        return CONFIRM_CERTIFICATE+BEFORE_ACTION;
+    }
+}

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

Added: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ViewKeystoreHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ViewKeystoreHandler.java?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ViewKeystoreHandler.java (added)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/keystores/ViewKeystoreHandler.java Thu Mar 23 11:20:22 2006
@@ -0,0 +1,55 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  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.keystores;
+
+import org.apache.geronimo.console.MultiPageModel;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * Handler for entering a password to unlock a keystore
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class ViewKeystoreHandler extends BaseKeystoreHandler {
+    public ViewKeystoreHandler() {
+        super(VIEW_KEYSTORE, "/WEB-INF/view/keystore/viewKeystore.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = request.getParameter("id");
+        if(id != null) {
+            response.setRenderParameter("id", id);
+        } // else we hope this is after a failure and the actionAfterView took care of it below!
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
+        String id = request.getParameter("id");
+        request.setAttribute("id", id);
+        request.setAttribute("keystore", request.getPortletSession(true).getAttribute(KEYSTORE_DATA_PREFIX + id));
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        return LIST_MODE+BEFORE_ACTION;
+    }
+}

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

Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java (original)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java Thu Mar 23 11:20:22 2006
@@ -21,6 +21,8 @@
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.config.ConfigurationInfo;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -30,6 +32,8 @@
 import org.apache.geronimo.management.geronimo.*;
 import org.apache.geronimo.pool.GeronimoExecutor;
 import org.apache.geronimo.security.realm.SecurityRealm;
+import org.apache.geronimo.security.jaas.server.JaasLoginServiceMBean;
+import org.apache.geronimo.security.keystore.KeystoreManager;
 import org.apache.geronimo.system.logging.SystemLog;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
@@ -158,6 +162,16 @@
         return helper.getServerInfo(getCurrentServer(request));
     }
 
+    public static JaasLoginServiceMBean getLoginService(PortletRequest request) {
+        ManagementHelper helper = getManagementHelper(request);
+        return helper.getLoginService(getCurrentServer(request));
+    }
+
+    public static KeystoreManager getKeystoreManager(PortletRequest request) {
+        ManagementHelper helper = getManagementHelper(request);
+        return helper.getKeystoreManager(getCurrentServer(request));
+    }
+
     public static void testLoginModule(PortletRequest request, LoginModule module, Map options) {
         ManagementHelper helper = getManagementHelper(request);
         helper.testLoginModule(getCurrentServer(request), module, options);
@@ -271,6 +285,11 @@
         return helper.getWebAccessLog(manager, containerObjectName);
     }
 
+    public static WebConnector getWebConnector(PortletRequest request, String connectorObjectName) {
+        ManagementHelper helper = getManagementHelper(request);
+        return (WebConnector) helper.getObject(connectorObjectName);
+    }
+
     public static WebContainer getWebContainer(PortletRequest request, String containerObjectName) {
         ManagementHelper helper = getManagementHelper(request);
         return (WebContainer) helper.getObject(containerObjectName);
@@ -436,6 +455,11 @@
         return null;
     }
 
+    public static ConfigurationInfo[] getConfigurations(PortletRequest request, ConfigurationModuleType type, boolean includeChildModules) {
+        ManagementHelper helper = getManagementHelper(request);
+        return helper.getConfigurations(type, includeChildModules);
+    }
+
     /**
      * Looks up the context prefix used by the portal, even if the thing running
      * is in one of the portlets.  We're kind of hacking our way there, but hey,
@@ -448,6 +472,9 @@
             RenderResponse renderResponse = (RenderResponse)o;
             contextPath = renderResponse.createRenderURL().toString();
             int index = contextPath.indexOf(request.getPathInfo());
+            if(index == -1) { // todo: Hack!  But this doesn't always work otherwise if invoked from a page that was invoked from another portlet instead of a page accessed by top-level navigation
+                index = contextPath.indexOf(request.getPathInfo().substring(0, 20));
+            }
             contextPath = contextPath.substring(0,index);
         } else { // request did not come from a portlet
             contextPath = request.getContextPath();

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=388236&r1=388235&r2=388236&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 Thu Mar 23 11:20:22 2006
@@ -552,6 +552,52 @@
     </portlet>
 
     <portlet>
+        <description>Portlet for configuring Geronimo with Apache via mod_jk</description>
+        <portlet-name>ApacheJK</portlet-name>
+        <display-name>Apache mod_jk Wizard</display-name>
+
+        <portlet-class>org.apache.geronimo.console.apache.jk.ApacheConfigPortlet</portlet-class>
+
+        <expiration-cache>-1</expiration-cache>
+
+        <supports>
+            <mime-type>text/html</mime-type>
+            <portlet-mode>VIEW</portlet-mode>
+        </supports>
+
+        <supported-locale>en</supported-locale>
+
+        <portlet-info>
+            <title>Apache mod_jk Configuration</title>
+            <short-title>Apache mod_jk</short-title>
+            <keywords>Apache http mod_jk jk ajp</keywords>
+        </portlet-info>
+    </portlet>
+
+    <portlet>
+        <description>New Portlet for configuring Keystores</description>
+        <portlet-name>Keystores</portlet-name>
+        <display-name>Keystore Wizard</display-name>
+
+        <portlet-class>org.apache.geronimo.console.keystores.KeystoresPortlet</portlet-class>
+
+        <expiration-cache>-1</expiration-cache>
+
+        <supports>
+            <mime-type>text/html</mime-type>
+            <portlet-mode>VIEW</portlet-mode>
+        </supports>
+
+        <supported-locale>en</supported-locale>
+
+        <portlet-info>
+            <title>Keystore Configuration</title>
+            <short-title>Keystores</short-title>
+            <keywords>Keystore Keytool SSL</keywords>
+        </portlet-info>
+    </portlet>
+
+    <portlet>
         <description>Portlet for managing JMS connections</description>
         <portlet-name>JMSConnections</portlet-name>
         <display-name>JMS Connection Factory Portlet</display-name>

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/ajpPort.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/ajpPort.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/ajpPort.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/ajpPort.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,47 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+<p><b>Apache mod_jk</b> -- AJP Port</p>
+
+<!-- FORM TO COLLECT DATA FOR THIS PAGE -->
+<form name="<portlet:namespace/>ApacheForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="ajp-after"/>
+    <input type="hidden" name="os" value="${model.os}"/>
+    <input type="hidden" name="workersPath" value="${model.workersPath}"/>
+    <input type="hidden" name="logFilePath" value="${model.logFilePath}"/>
+    <c:forEach var="webApp" items="${model.webApps}" varStatus="status">
+        <input type="hidden" name="webapp.${status.index}.configId" value="${webApp.configId}"/>
+        <input type="hidden" name="webapp.${status.index}.enabled" value="${webApp.enabled}"/>
+        <input type="hidden" name="webapp.${status.index}.dynamicPattern" value="${webApp.dynamicPattern}"/>
+        <input type="hidden" name="webapp.${status.index}.serveStaticContent" value="${webApp.serveStaticContent}"/>
+        <input type="hidden" name="webapp.${status.index}.contextRoot" value="${webApp.contextRoot}"/>
+        <input type="hidden" name="webapp.${status.index}.webAppDir" value="${webApp.webAppDir}"/>
+    </c:forEach>
+    <table border="0">
+        <!-- ENTRY FIELD: AJP Port -->
+        <tr>
+            <th><div align="right">Network Port for AJP:</div></th>
+            <td><input name="addAjpPort" type="text" size="5" maxlength="5"
+                       value="${model.addAjpPort}"/></td>
+        </tr>
+        <tr>
+            <td></td>
+            <td><tt>mod_jk</tt> talks to the Geronimo web container using a protocol called
+              AJP.  Currently, you do not have an AJP protocol listener configured for the
+              web container.  Select a network port here, and an AJP protocol listener will
+              be added for you.</td>
+        </tr>
+
+        <!-- SUBMIT BUTTON -->
+        <tr>
+            <td></td>
+            <td><input type="submit" value="Next"/></td>
+        </tr>
+    </table>
+</form>
+<!-- END OF FORM TO COLLECT DATA FOR THIS PAGE -->
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/ajpPort.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/config.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/config.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/config.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/config.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,83 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+<p><b>Apache mod_jk</b> -- Basic Configuration</p>
+
+<!-- FORM TO COLLECT DATA FOR THIS PAGE -->
+<form name="<portlet:namespace/>ApacheForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="basic-after"/>
+    <input type="hidden" name="addAjpPort" value="${model.addAjpPort}"/>
+    <c:forEach var="webApp" items="${model.webApps}" varStatus="status">
+        <input type="hidden" name="webapp.${status.index}.configId" value="${webApp.configId}"/>
+        <input type="hidden" name="webapp.${status.index}.enabled" value="${webApp.enabled}"/>
+        <input type="hidden" name="webapp.${status.index}.dynamicPattern" value="${webApp.dynamicPattern}"/>
+        <input type="hidden" name="webapp.${status.index}.serveStaticContent" value="${webApp.serveStaticContent}"/>
+        <input type="hidden" name="webapp.${status.index}.contextRoot" value="${webApp.contextRoot}"/>
+        <input type="hidden" name="webapp.${status.index}.webAppDir" value="${webApp.webAppDir}"/>
+    </c:forEach>
+    <table border="0">
+        <!-- ENTRY FIELD: OS -->
+        <tr>
+            <th><div align="right">Operating System:</div></th>
+            <td>
+                <select name="os">
+                    <option></option>
+                    <option <c:if test="${model.os == 'Fedora Core 4'}">selected</c:if>>Fedora Core 4</option>
+                    <option <c:if test="${model.os == 'SuSE Pro 9.0'}">selected</c:if>>SuSE Pro 9.0</option>
+                    <option <c:if test="${model.os == 'SuSE Pro 9.1'}">selected</c:if>>SuSE Pro 9.1</option>
+                    <option <c:if test="${model.os == 'SuSE Pro 9.2'}">selected</c:if>>SuSE Pro 9.2</option>
+                    <option <c:if test="${model.os == 'SuSE Pro 9.3'}">selected</c:if>>SuSE Pro 9.3</option>
+                    <option <c:if test="${model.os == 'SuSE Linux 10.0'}">selected</c:if>>SuSE Linux 10.0</option>
+                    <option <c:if test="${model.os == 'Other'}">selected</c:if>>Other</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <td></td>
+            <td>The process for installing <tt>mod_jk</tt> depends on the operating system. For some,
+                we can provide specific guidance. For others, you'll have to install <tt>mod_jk</tt>
+                on your own.
+            </td>
+        </tr>
+
+        <!-- ENTRY FIELD: workers.properties path -->
+        <tr>
+            <th><div align="right">Path to <tt>workers.properties</tt>:</div></th>
+            <td><input name="workersPath" type="text" size="30" maxlength="255"
+                       value="${model.workersPath}"/></td>
+        </tr>
+        <tr>
+            <td></td>
+            <td><tt>mod_jk</tt> requires a file called <tt>workers.properties</tt> to specify which
+              app servers can be contacted on which network ports, etc.  This tool will generate the
+              contents for the <tt>workers.properties</tt> file, but it also needs to point to this
+              file in the Apache configuration data, so we need to know where you plan to put this
+              file.</td>
+        </tr>
+
+        <!-- ENTRY FIELD: log file path -->
+        <tr>
+            <th><div align="right"><tt>mod_jk</tt> log file location:</div></th>
+            <td><input name="logFilePath" type="text" size="30" maxlength="255"
+                       value="${model.logFilePath}"/></td>
+        </tr>
+        <tr>
+            <td></td>
+            <td><tt>mod_jk</tt> writes to a log file in a location you choose.  The log file
+              location needs to be set in the Apache configuration.  Please select the location
+              where the <tt>mod_jk</tt> log file should be written.</td>
+        </tr>
+
+        <!-- SUBMIT BUTTON -->
+        <tr>
+            <td></td>
+            <td><input type="submit" value="Next"/></td>
+        </tr>
+    </table>
+</form>
+<!-- END OF FORM TO COLLECT DATA FOR THIS PAGE -->
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/config.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/index.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/index.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/index.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/index.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,26 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+<p>This tool walks you through the process of configuring access to Geronimo
+   through the Apache 2 HTTP server using the <tt>mod_jk</tt> Apache module.
+   There are several steps needed to do this:</p>
+<ol>
+    <li>Configure the Geronimo web container to support the AJP protocol</li>
+    <li>Install the <tt>mod_jk.so</tt> Apache module (compiling it if necessary)</li>
+    <li>Create a <tt>workers.properties</tt> configuration file to point Apache to the
+       Geronimo AJP connector</li>
+    <li>Add Apache configuration information indicating which URLs should be sent to
+       Geronimo and whether Apache should server static content</li>
+</ol>
+<p>By answering a few questions here, we can give you specific guidance and generate
+  configuration information you can use.</p>
+<p>Notes:</p>
+<ul>
+    <li>Geronimo does not remember previous settings generated using this tool;
+        you'll need to reenter all the data each time, or just paste the new
+        information into your existing configuration files.</li>
+    <li>Any web applications to be exposed via Apache must be running when you
+        run this tool, and of course must be running to be accessed from Apache.</li>
+</ul>
+
+<a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="index-after" /></portlet:actionURL>">Get Started</a>
\ No newline at end of file

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/results.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/results.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/results.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/results.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,136 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+
+<input type="hidden" name="mode" value="results-after"/>
+<input type="hidden" name="os" value="${model.os}"/>
+<input type="hidden" name="addAjpPort" value="${model.addAjpPort}"/>
+<input type="hidden" name="workersPath" value="${model.workersPath}"/>
+<input type="hidden" name="logFilePath" value="${model.logFilePath}"/>
+<c:forEach var="webApp" items="${model.webApps}" varStatus="status">
+    <input type="hidden" name="webapp.${status.index}.configId" value="${webApp.configId}"/>
+    <input type="hidden" name="webapp.${status.index}.enabled" value="${webApp.enabled}"/>
+    <input type="hidden" name="webapp.${status.index}.dynamicPattern" value="${webApp.dynamicPattern}"/>
+    <input type="hidden" name="webapp.${status.index}.serveStaticContent" value="${webApp.serveStaticContent}"/>
+    <input type="hidden" name="webapp.${status.index}.contextRoot" value="${webApp.contextRoot}"/>
+    <input type="hidden" name="webapp.${status.index}.webAppDir" value="${webApp.webAppDir}"/>
+</c:forEach>
+
+
+<p><b>Apache mod_jk</b> -- Configuration Results</p>
+
+<p>This page lists the things you must do to enable <tt>mod_jk</tt> in Apache
+    and configure it to talk to Geronimo.</p>
+
+<h2>Step 1: Configure Geronimo for AJP</h2>
+
+<c:choose>
+    <c:when test="${empty model.addAjpPort}">
+        <p>This Geronimo configuration already has an AJP listener running on port ${ajpPort}.
+            Nothing further needs to be done here.</p>
+    </c:when>
+    <c:otherwise>
+        <p>An AJP lisstner was added on port ${ajpPort}.  Nothing further needs to be done here.</p>
+    </c:otherwise>
+</c:choose>
+
+<h2>Step 2: Install <tt>mod_jk</tt></h2>
+
+<c:choose>
+    <c:when test="${model.os != '' && model.os != 'Other'}">
+        <p>On ${model.os}, you can install <tt>mod_jk</tt> using an RPM.  This does
+        not activate it in Apache, but it at least installs the binary in the right
+        location.  To install, find the following RPM on your install media and
+        run a command like this:</p>
+        <pre>
+rpm -Uvh <c:choose>
+            <c:when test="${model.os == 'Fedora Core 4'}">mod_jk-1.2.6-3jpp_4fc.i586.rpm</c:when>
+            <c:when test="${model.os == 'SuSE Pro 9.0'}">apache2-jakarta-tomcat-connectors-4.1.27-32.i586.rpm</c:when>
+            <c:when test="${model.os == 'SuSE Pro 9.1'}">apache2-jakarta-tomcat-connectors-5.0.19-13.i586.rpm</c:when>
+            <c:when test="${model.os == 'SuSE Pro 9.2'}">mod_jk-ap20-4.1.30-3.i586.rpm</c:when>
+            <c:when test="${model.os == 'SuSE Pro 9.3'}">mod_jk-ap20-4.1.30-3.i586.rpm</c:when>
+            <c:when test="${model.os == 'SuSE Linux 10.0'}">mod_jk-ap20-4.1.30-3.i586.rpm</c:when>
+</c:choose>
+        </pre>
+        <p>Once the <tt>mod_jk</tt> RPM is installed, you can activate it by
+   <c:choose>
+     <c:when test="${fn:startsWith(model.os, 'SuSE')}">
+          editing <tt>/etc/sysconfig/apache2</tt> and adding <tt>jk</tt> to the value configured for
+          <tt>APACHE_MODULES</tt> and then running (as root) <tt>SuSEconfig</tt> followed by
+          <tt>rcapache2 start</tt> (or <tt>rcapache2 restart</tt>).
+     </c:when>
+     <c:otherwise>
+          adding the following line to <tt>/etc/httpd/conf/httpd.conf</tt>:</p>
+<pre>
+LoadModule jk_module modules/mod_jk.so
+</pre>
+        <p>Then you can start Apache by running <tt>service httpd start</tt> (or <tt>service httpd restart</tt>).
+     </c:otherwise>
+   </c:choose>
+        </p>
+    </c:when><c:otherwise>
+        <p>Based on your operating system selection, I don't have specific instructions
+            to install <tt>mod_jk</tt>.  You may be able to get a binary release from
+            <a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/">http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/</a>.
+            Otherwise, you'll have to build from source.</p>
+        <p>To enable <tt>mod_jk</tt> in Apache, you typically need to install the <tt>.so</tt> (Linux/UNIX/Mac OS X)
+          or <tt>.dll</tt> (Windows) and then add a line to the <tt>httpd.conf</tt> file like this:</p>
+<pre>
+LoadModule jk_module modules/mod_jk.so
+</pre>
+        <p>Finally, start or restart Apache.</p>
+    </c:otherwise>
+</c:choose>
+
+<h2>Step 3: Create a <tt>workers.properties</tt> file</h2>
+
+<p>You've decided to save this file at <tt>${model.workersPath}</tt>.  Please save the following content
+  to that file.</p>
+<pre>
+worker.list=geronimo_ajp13
+worker.geronimo_ajp13.port=${ajpPort}
+worker.geronimo_ajp13.host=localhost
+worker.geronimo_ajp13.type=ajp13
+</pre>
+
+<h2>Step 4: Apache Configuration</h2>
+
+<p>The following information needs to go into your Apache Configuration.</p>
+
+<c:choose>
+  <c:when test="${fn:startsWith(model.os, 'SuSE')}">
+       <p>For SuSE, this should be saved to a file in the Apache conf.d dir, e.g.
+         write this content to <tt>/etc/apache2/conf.d/geronimo-jk.conf</tt></p>
+  </c:when>
+  <c:otherwise>
+      <p>This information should be added to the Apache configuration file.  This is often
+      at a location such as <tt>/etc/httpd/conf/httpd.conf</tt></p>
+  </c:otherwise>
+</c:choose>
+
+<pre>
+&lt;IfModule mod_jk.c&gt;
+    JkWorkersFile ${model.workersPath}
+    JkLogFile ${model.logFilePath}
+    JkLogLevel error
+<c:forEach var="web" items="${model.webApps}"><c:if test="${web.enabled}">
+    JkMount ${web.contextRoot} ajp13<c:if test="${web.serveStaticContent}">
+    Alias ${web.contextRoot} "${web.webAppDir}"
+    &lt;Directory "${web.webAppDir}"&gt;
+        Options Indexes FollowSymLinks
+        allow from all
+    &lt;/Directory&gt;
+    &lt;Location "${web.contextRoot}/WEB-INF/"&gt;
+        AllowOverride None
+        deny from all
+    &lt;/Location&gt;
+</c:if></c:if></c:forEach>
+&lt;/IfModule&gt;
+</pre>
+
+<h2>Step 5: Restart Apache</h2>
+
+<p>With those steps completed, Apache should be ready to go!  Start Geronimo and restart Apache
+and try accessing a Geronimo web application through an Apache URL.  If there are any problems,
+check the Apache error log, and the mod_jk error log (at ${model.logFilePath}).</p>
\ No newline at end of file

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/results.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/webApps.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/webApps.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/webApps.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/webApps.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,59 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+<p><b>Apache mod_jk</b> -- Web App Selection</p>
+
+<p>For each web application available in Geronimo, select:</p>
+<dl>
+  <dt>Through Apache</dt>
+  <dd>Whether the web application should be exposed through Apache</dd>
+  <dt>Static Content</dt>
+  <dd>Whether Apache should serve static content for the web application (instead of all
+    content being handled by Geronimo)</dd>
+  <dt>Dynamic Paths</dt>
+  <dd>If Apache is serving static content, which URL paths should be passed to Geronimo
+      (e.g. <tt>/servlet/*</tt> or <tt>/sample/*.jsp</tt>)</dd>
+</dl>
+
+<!-- FORM TO COLLECT DATA FOR THIS PAGE -->
+<form name="<portlet:namespace/>ApacheForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="webapp-after"/>
+    <input type="hidden" name="os" value="${model.os}"/>
+    <input type="hidden" name="addAjpPort" value="${model.addAjpPort}"/>
+    <input type="hidden" name="workersPath" value="${model.workersPath}"/>
+    <input type="hidden" name="logFilePath" value="${model.logFilePath}"/>
+<c:forEach var="webApp" items="${model.webApps}" varStatus="status">
+    <input type="hidden" name="webapp.${status.index}.configId" value="${webApp.configId}"/>
+    <input type="hidden" name="webapp.${status.index}.contextRoot" value="${webApp.contextRoot}"/>
+    <input type="hidden" name="webapp.${status.index}.webAppDir" value="${webApp.webAppDir}"/>
+</c:forEach>
+    <table border="0">
+        <tr>
+            <th>Web Application</th>
+            <th>Through Apache</th>
+            <th>Static Content</th>
+            <th>Dynamic Paths</th>
+        </tr>
+      <c:forEach var="web" items="${webApps}" varStatus="status">
+        <tr>
+            <td>${web.configID}</td>
+            <td align="center"><input type="checkbox" name="webapp.${status.index}.enabled"<c:if test="${model.webApps[status.index].enabled}"> checked="checked"</c:if> /></td>
+            <td align="center"><input type="checkbox" name="webapp.${status.index}.serveStaticContent"<c:if test="${model.webApps[status.index].serveStaticContent}"> checked="checked"</c:if> /></td>
+            <td><input type="text" name="webapp.${status.index}.dynamicPattern" size="20" maxlength="250"
+                       value="${model.webApps[status.index].dynamicPattern}"/></td>
+        </tr>
+      </c:forEach>
+
+        <!-- SUBMIT BUTTON -->
+        <tr>
+            <td></td>
+            <td colspan="3"><input type="submit" value="Finish"/></td>
+        </tr>
+    </table>
+</form>
+<!-- END OF FORM TO COLLECT DATA FOR THIS PAGE -->
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="index-before" />
+            </portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/apache/jk/webApps.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/configureKey.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/configureKey.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/configureKey.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/configureKey.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,99 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>On this screen you can configure the settings to generate a new private key.
+The next screen will let you review this information before generating the
+private key and accompanying certificate.</p>
+
+<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="keystore" value="${keystore}" />
+    <input type="hidden" name="mode" value="configureKey-after" />
+    <table border="0">
+        <tr>
+            <th align="right">Alias for new key:</th>
+            <td>
+                <input type="text" name="alias" size="20" maxlength="100" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Password for new key:</th>
+            <td>
+                <input type="password" name="password" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Key Size:</th>
+            <td>
+                <select name="keySize">
+                    <option>512</option>
+                    <option selected="true">1024</option>
+                    <option>2048</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Algorithm:</th>
+            <td>
+                <select name="algorithm">
+                    <option>MD2withRSA</option>
+                    <option selected="true">MD5withRSA</option>
+                    <option>SHA1withRSA</option>
+                </select>
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Valid for (# of days):</th>
+            <td>
+                <input type="text" name="valid" size="5" maxlength="8" />
+            </td>
+        </tr>
+        <tr>
+            <th colspan="2">Certificate Identity</th>
+        </tr>
+        <tr>
+            <th align="right">Server Hostname (CN):</th>
+            <td>
+                <input type="text" name="certCN" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Company/Organization (O):</th>
+            <td>
+                <input type="text" name="certO" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Division/Business Unit (OU):</th>
+            <td>
+                <input type="text" name="certOU" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">City/Locality (L):</th>
+            <td>
+                <input type="text" name="certL" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">State/Province (ST):</th>
+            <td>
+                <input type="text" name="certST" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Country Code (2 char) (C):</th>
+            <td>
+                <input type="text" name="certC" size="3" maxlength="2" />
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Review Key Data" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="viewKeystore-before" />
+              <portlet:param name="id" value="${keystore}" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmCertificate.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmCertificate.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmCertificate.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmCertificate.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,44 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>Please confirm that this is the correct certificate to import:</p>
+
+<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="id" value="${id}" />
+    <input type="hidden" name="alias" value="${alias}" />
+    <input type="hidden" name="certificate" value="${certificate}" />
+    <input type="hidden" name="mode" value="confirmCertificate-after" />
+
+    <table border="0">
+        <tr>
+            <th align="right">Fingerprint:</th>
+            <td>${fingerprint}</td>
+        </tr>
+        <tr>
+            <th align="right">Subject:</th>
+            <td>${subject}</td>
+        </tr>
+        <tr>
+            <th align="right">Issuer:</th>
+            <td>${issuer}</td>
+        </tr>
+        <tr>
+            <th align="right">Validity:</th>
+            <td>${validStart} to ${validEnd}</td>
+        </tr>
+        <tr>
+            <th align="right">Serial Number:</th>
+            <td>${serial}</td>
+        </tr>
+    </table>
+
+    <input type="submit" value="Import Certificate" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="viewKeystore-before" />
+              <portlet:param name="id" value="${id}" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmKey.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmKey.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmKey.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/confirmKey.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,53 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>Please confirm that this is the correct certificate to import:</p>
+
+<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="confirmKey-after" />
+    <input type="hidden" name="keystore" value="${keystore}" />
+    <input type="hidden" name="alias" value="${alias}" />
+    <input type="hidden" name="password" value="${password}" />
+    <input type="hidden" name="keySize" value="${keySize}" />
+    <input type="hidden" name="algorithm" value="${algorithm}" />
+    <input type="hidden" name="valid" value="${valid}" />
+    <input type="hidden" name="certCN" value="${certCN}" />
+    <input type="hidden" name="certO" value="${certO}" />
+    <input type="hidden" name="certOU" value="${certOU}" />
+    <input type="hidden" name="certL" value="${certL}" />
+    <input type="hidden" name="certST" value="${certST}" />
+    <input type="hidden" name="certC" value="${certC}" />
+
+    <table border="0">
+        <tr>
+            <th align="right">Alias:</th>
+            <td>${alias}</td>
+        </tr>
+        <tr>
+            <th align="right">Key Type:</th>
+            <td>${algorithm} -- ${keySize} bits</td>
+        </tr>
+        <tr>
+            <th align="right">Validity:</th>
+            <td>${validFrom} to ${validTo}</td>
+        </tr>
+        <tr>
+            <th align="right" valign="top">Identity:</th>
+            <td>
+                ${certCN}<br />
+                ${certOU}, ${certO}<br />
+                ${certL}, ${certST} ${certC}
+            </td>
+        </tr>
+    </table>
+
+    <input type="submit" value="Generate Key" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="viewKeystore-before" />
+              <portlet:param name="id" value="${id}" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/createKeystore.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/createKeystore.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/createKeystore.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/createKeystore.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,28 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="createKeystore-after" />
+    <table border="0">
+        <tr>
+            <th align="right">Keystore file name:</th>
+            <td>
+                <input type="text" name="filename" size="20" maxlength="100" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Password for new keystore:</th>
+            <td>
+                <input type="password" name="password" size="20" maxlength="200" />
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Create Keystore" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="list-before" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/index.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/index.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/index.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/index.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,82 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+<p>This tool walks you through the process of configuring keystores to use with
+  SSL connectors (for the web container, etc.).</p>
+
+<c:choose>
+  <c:when test="${empty(keystores)}"><p><i>There are no keystores defined</i></p></c:when>
+  <c:otherwise>
+<p>Keystores start out as locked against editing and also not available for usage by
+other components in the server.  The <b>Editable</b> flag indicates whether the keystore
+has been unlocked for editing (by entering the keystore password), which lasts for the
+current login session.  The <b>Available</b> flag indicates whether that password has
+been saved in order to make the keystore available to other components in the server.</p>
+
+<% String consoleServletPath = PortletManager.getConsoleFrameworkServletPath(request); %>
+
+<table width="100%">
+  <tr>
+    <td class="DarkBackground">Keystore File</td>
+    <td class="DarkBackground" align="center">Contents</td>
+    <td class="DarkBackground" align="center">Editable</td>
+    <td class="DarkBackground" align="center">Available</td>
+  </tr>
+<c:forEach var="keystore" items="${keystores}">
+  <tr>
+    <td>
+      <c:choose>
+        <c:when test="${keystore.locked}">
+          ${keystore.instance.keystoreName}
+        </c:when>
+        <c:otherwise>
+          <a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="viewKeystore-before" /><portlet:param name="id" value="${keystore.instance.keystoreName}" /></portlet:actionURL>">${keystore.instance.keystoreName}</a>
+        </c:otherwise>
+      </c:choose>
+    </td>
+    <td>
+        <c:choose>
+          <c:when test="${keystore.locked}">
+              <i>Keystore locked</i>
+          </c:when>
+          <c:otherwise>
+            ${fn:length(keystore.keys)} Key<c:if test="${fn:length(keystore.keys) != 1}">s</c:if>
+              and
+            ${fn:length(keystore.certificates)} Cert<c:if test="${fn:length(keystore.certificates) != 1}">s</c:if>
+          </c:otherwise>
+        </c:choose>
+    </td>
+    <td>
+      <c:choose>
+        <c:when test="${keystore.locked}">
+          <a href="<portlet:actionURL portletMode="view">
+            <portlet:param name="mode" value="unlockEdit-before" />
+            <portlet:param name="id" value="${keystore.instance.keystoreName}" />
+            </portlet:actionURL>"><img src="<%=consoleServletPath%>/../images/ico_lock_16x16.gif" alt="Locked" /></a>
+        </c:when>
+        <c:otherwise>
+          <img src="<%=consoleServletPath%>/../images/ico_unlock3_16x16.gif" alt="Unlocked" />
+        </c:otherwise>
+      </c:choose>
+    </td>
+    <td>
+      <c:choose>
+        <c:when test="${keystore.instance.keystoreLocked}">
+          <img src="<%=consoleServletPath%>/../images/ico_lock_16x16.gif" alt="Locked" />
+        </c:when>
+        <c:otherwise>
+          <img src="<%=consoleServletPath%>/../images/ico_unlock3_16x16.gif" alt="Unlocked" />
+        </c:otherwise>
+      </c:choose>
+    </td>
+  </tr>
+</c:forEach>
+</table>
+  </c:otherwise>
+</c:choose>
+
+<p>
+    <a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="createKeystore-before" /></portlet:actionURL>">New Keystore</a>
+</p>
\ No newline at end of file

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/unlockKeystore.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/unlockKeystore.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/unlockKeystore.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/unlockKeystore.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,18 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="keystore" value="${id}" />
+    <input type="hidden" name="mode" value="unlockEdit-after" />
+    <b>Enter keystore password:</b>
+    <input type="password" name="password" size="20" maxlength="200" />
+    <br />
+    <input type="submit" value="Unlock Keystore" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="list-before" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/uploadCertificate.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/uploadCertificate.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/uploadCertificate.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/uploadCertificate.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,34 @@
+<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<p>This screen lets you select a certificate to import into the keystore.  Select the
+certificate file and specify an alias to store it under in the keystore.  The next
+step will be to review the certificate before committing it to the keystore.</p>
+
+<form enctype="multipart/form-data" method="POST" name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="id" value="${id}" />
+    <input type="hidden" name="mode" value="uploadCertificate-after" />
+    <table border="0">
+        <tr>
+            <th align="right">Certificate file:</th>
+            <td>
+                <input type="file" name="certificate" size="40" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Alias for certificate:</th>
+            <td>
+                <input type="text" name="alias" size="20" maxlength="200" />
+            </td>
+        </tr>
+    </table>
+    <input type="submit" value="Review Certificate" />
+</form>
+
+
+<p><a href="<portlet:actionURL portletMode="view">
+              <portlet:param name="mode" value="viewKeystore-before" />
+              <portlet:param name="id" value="${id}" />
+            </portlet:actionURL>">Cancel</a></p>

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

Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/viewKeystore.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/viewKeystore.jsp?rev=388236&view=auto
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/viewKeystore.jsp (added)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/viewKeystore.jsp Thu Mar 23 11:20:22 2006
@@ -0,0 +1,33 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+<p>This screen lists the contents of a keystore.</p>
+
+<table width="100%">
+  <tr>
+    <td class="DarkBackground">Alias</td>
+    <td class="DarkBackground" align="center">Type</td>
+    <td class="DarkBackground" align="center">Certificate Fingerprint</td>
+  </tr>
+<c:forEach var="alias" items="${keystore.certificates}">
+  <tr>
+    <td>${alias}</td>
+    <td>Trusted Certificate</td>
+    <td>${keystore.fingerprints[alias]}</td>
+  </tr>
+</c:forEach>
+<c:forEach var="alias" items="${keystore.keys}">
+  <tr>
+    <td>${alias}</td>
+    <td>Private Key</td>
+    <td>${keystore.fingerprints[alias]}</td>
+  </tr>
+</c:forEach>
+</table>
+
+<p>
+    <a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="uploadCertificate-before" /><portlet:param name="id" value="${keystore.instance.keystoreName}" /></portlet:actionURL>">Add Trust Certificate</a>
+    <a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="configureKey-before" /><portlet:param name="keystore" value="${keystore.instance.keystoreName}" /></portlet:actionURL>">Create Private Key</a>
+    <a href="<portlet:actionURL portletMode="view"><portlet:param name="mode" value="list-before" /></portlet:actionURL>">Return to keystore list</a>
+</p>
\ No newline at end of file

Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/keystore/viewKeystore.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=388236&r1=388235&r2=388236&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 Thu Mar 23 11:20:22 2006
@@ -193,7 +193,20 @@
         </init-param>
     </servlet>
     <servlet>
-        <display-name>Pluto Wrapper for Keystore Portlet</display-name>
+        <display-name>Pluto Wrapper for Apache mod_jk Portlet</display-name>
+        <servlet-name>ApacheJK</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.apache.jk.ApacheConfigPortlet</param-value>
+        </init-param>
+        <init-param>
+            <param-name>portlet-guid</param-name>
+            <param-value>console-standard.ApacheJK</param-value>
+        </init-param>
+    </servlet>
+    <servlet>
+        <display-name>Pluto Wrapper for Old Keystore Portlet</display-name>
         <servlet-name>Keystore</servlet-name>
         <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
         <init-param>
@@ -205,6 +218,19 @@
             <param-value>console-standard.Keystore</param-value>
         </init-param>
     </servlet>
+    <servlet>
+        <display-name>Pluto Wrapper for New Keystore Portlet</display-name>
+        <servlet-name>Keystores</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.keystores.KeystoresPortlet</param-value>
+        </init-param>
+        <init-param>
+            <param-name>portlet-guid</param-name>
+            <param-value>console-standard.Keystores</param-value>
+        </init-param>
+    </servlet>
 
 
     <servlet>
@@ -761,8 +787,16 @@
         <url-pattern>/SecurityRealms/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
+        <servlet-name>ApacheJK</servlet-name>
+        <url-pattern>/ApacheJK/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
         <servlet-name>Keystore</servlet-name>
         <url-pattern>/Keystore/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Keystores</servlet-name>
+        <url-pattern>/Keystores/*</url-pattern>
     </servlet-mapping>
 
 

Modified: geronimo/trunk/configs/j2ee-security/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-security/project.xml?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-security/project.xml (original)
+++ geronimo/trunk/configs/j2ee-security/project.xml Thu Mar 23 11:20:22 2006
@@ -79,6 +79,14 @@
         </dependency>
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-util</artifactId>
+            <version>${geronimo_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-j2ee</artifactId>
             <version>${geronimo_version}</version>
         </dependency>

Modified: geronimo/trunk/configs/j2ee-security/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-security/src/plan/plan.xml?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-security/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/j2ee-security/src/plan/plan.xml Thu Mar 23 11:20:22 2006
@@ -26,8 +26,6 @@
     xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
                configId="${pom.groupId}/${pom.artifactId}/${pom.currentVersion}/car"
     >
-
-
     <!--runtime dependencies-->
 
     <gbean name="SecurityService" class="org.apache.geronimo.security.SecurityServiceImpl">
@@ -100,4 +98,13 @@
         <reference name="LoginService"><name>JaasLoginService</name></reference>
     </gbean>
 
+    <gbean name="KeystoreManager" class="org.apache.geronimo.security.keystore.FileKeystoreManager">
+        <attribute name="keystoreDir">var/security/keystores</attribute>
+        <reference name="ServerInfo"><module>geronimo/j2ee-system/${pom.currentVersion}/car</module><name>ServerInfo</name></reference>
+        <references name="KeystoreInstances">
+          <pattern>
+            <gbean-name>geronimo.server:j2eeType=Keystore,*</gbean-name>
+          </pattern>
+        </references>
+    </gbean>
 </configuration>

Modified: geronimo/trunk/configs/rmi-naming/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/rmi-naming/project.xml?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/configs/rmi-naming/project.xml (original)
+++ geronimo/trunk/configs/rmi-naming/project.xml Thu Mar 23 11:20:22 2006
@@ -238,6 +238,14 @@
         </dependency>
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-util</artifactId>
+            <version>${geronimo_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-webservices</artifactId>
             <version>${geronimo_version}</version>
             <properties>

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java Thu Mar 23 11:20:22 2006
@@ -107,6 +107,7 @@
     public static final String CORBA_CSS = "CORBACSS";
     public static final String CORBA_TSS = "CORBATSS";
     public static final String WEB_SERVICE_LINK = "WSLink";
+    public static final String KEYSTORE_INSTANCE = "Keystore";
 
     public static ObjectName getDomainName(String j2eeDomainName, J2eeContext context) throws MalformedObjectNameException {
         Properties props = new Properties();

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java Thu Mar 23 11:20:22 2006
@@ -215,6 +215,16 @@
         return null;
     }
 
+    public String getKeystoreManager() {
+        GBeanQuery query = new GBeanQuery(null, "org.apache.geronimo.security.keystore.KeystoreManager");
+        Set set = kernel.listGBeans(query);
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            return name.getCanonicalName();
+        }
+        return null;
+    }
+
     public String getServerVendor() {
         return SERVER_VENDOR;
     }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationInfo.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationInfo.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationInfo.java Thu Mar 23 11:20:22 2006
@@ -29,6 +29,7 @@
  */
 public class ConfigurationInfo implements Serializable {
     private final ObjectName storeName;
+    private final URI parentID;
     private final URI configID;
     private final State state;
     private final ConfigurationModuleType type;
@@ -38,6 +39,15 @@
         this.configID = configID;
         this.state = state;
         this.type = type;
+        this.parentID = null;
+    }
+
+    public ConfigurationInfo(ObjectName storeName, URI parentID, URI configID, State state, ConfigurationModuleType type) {
+        this.storeName = storeName;
+        this.parentID = parentID;
+        this.configID = configID;
+        this.state = state;
+        this.type = type;
     }
 
     public ObjectName getStoreName() {
@@ -55,5 +65,8 @@
     public ConfigurationModuleType getType() {
         return type;
     }
-    
+
+    public URI getParentID() {
+        return parentID;
+    }
 }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManager.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManager.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManager.java Thu Mar 23 11:20:22 2006
@@ -17,6 +17,7 @@
 package org.apache.geronimo.kernel.config;
 
 import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
 import java.io.IOException;
 import java.net.URI;
 import java.util.List;
@@ -47,6 +48,13 @@
      * @throws NoSuchStoreException if the store could not be located
      */
     List listConfigurations(ObjectName store) throws NoSuchStoreException;
+
+    /**
+     * Return a list of the module information within an EAR configuration.
+     * @param ear The EAR to lda children for
+     * @return a List<ConfigurationInfo> of all the configurations in the EAR
+     */
+    public List listChildConfigurations(ConfigurationInfo ear);
 
     /**
      * Load the specified configuration into the kernel. This does not start the configuration gbean

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java Thu Mar 23 11:20:22 2006
@@ -32,12 +32,14 @@
 import javax.management.ObjectName;
 import java.io.IOException;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
+import java.util.Collections;
 
 /**
  * The standard non-editable ConfigurationManager implementation.  That is,
@@ -92,6 +94,91 @@
             }
         }
         throw new NoSuchStoreException("No such store: " + storeName);
+    }
+
+    public List listChildConfigurations(ConfigurationInfo ear) {
+        try {
+            String configName = ear.getConfigID().toString();
+            List kids = new ArrayList();
+            Set test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=WebModule,*"));
+            for (Iterator it = test.iterator(); it.hasNext();) {
+                ObjectName child = (ObjectName) it.next();
+                String childName = child.getKeyProperty("name");
+                State state;
+                if (kernel.isLoaded(child)) {
+                    try {
+                        state = State.fromInt(kernel.getGBeanState(child));
+                    } catch (Exception e) {
+                        state = null;
+                    }
+                } else {
+                    // If the configuration is not loaded by the kernel
+                    // and defined by the store, then it is stopped.
+                    state = State.STOPPED;
+                }
+                kids.add(new ConfigurationInfo(ear.getStoreName(), ear.getConfigID(), new URI(childName), state, ConfigurationModuleType.WAR));
+            }
+            test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=EJBModule,*"));
+            for (Iterator it = test.iterator(); it.hasNext();) {
+                ObjectName child = (ObjectName) it.next();
+                String childName = child.getKeyProperty("name");
+                State state;
+                if (kernel.isLoaded(child)) {
+                    try {
+                        state = State.fromInt(kernel.getGBeanState(child));
+                    } catch (Exception e) {
+                        state = null;
+                    }
+                } else {
+                    // If the configuration is not loaded by the kernel
+                    // and defined by the store, then it is stopped.
+                    state = State.STOPPED;
+                }
+                kids.add(new ConfigurationInfo(ear.getStoreName(), ear.getConfigID(), new URI(childName), state, ConfigurationModuleType.EJB));
+            }
+            test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=AppClientModule,*"));
+            for (Iterator it = test.iterator(); it.hasNext();) {
+                ObjectName child = (ObjectName) it.next();
+                String childName = child.getKeyProperty("name");
+                State state;
+                if (kernel.isLoaded(child)) {
+                    try {
+                        state = State.fromInt(kernel.getGBeanState(child));
+                    } catch (Exception e) {
+                        state = null;
+                    }
+                } else {
+                    // If the configuration is not loaded by the kernel
+                    // and defined by the store, then it is stopped.
+                    state = State.STOPPED;
+                }
+                kids.add(new ConfigurationInfo(ear.getStoreName(), ear.getConfigID(), new URI(childName), state, ConfigurationModuleType.CAR));
+            }
+            test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=ResourceAdapterModule,*"));
+            for (Iterator it = test.iterator(); it.hasNext();) {
+                ObjectName child = (ObjectName) it.next();
+                String childName = child.getKeyProperty("name");
+                State state;
+                if (kernel.isLoaded(child)) {
+                    try {
+                        state = State.fromInt(kernel.getGBeanState(child));
+                    } catch (Exception e) {
+                        state = null;
+                    }
+                } else {
+                    // If the configuration is not loaded by the kernel
+                    // and defined by the store, then it is stopped.
+                    state = State.STOPPED;
+                }
+                kids.add(new ConfigurationInfo(ear.getStoreName(), ear.getConfigID(), new URI(childName), state, ConfigurationModuleType.RAR));
+            }
+            return kids;
+        } catch (MalformedObjectNameException e) {
+            log.error("Unexpected error loading child configurations", e);
+        } catch (URISyntaxException e) {
+            log.error("Unexpected error loading child configurations", e);
+        }
+        return Collections.EMPTY_LIST;
     }
 
     public boolean isLoaded(URI configID) {

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java Thu Mar 23 11:20:22 2006
@@ -97,4 +97,15 @@
      * @return The ObjectName of the LoginService, in String form.
      */
     public String getLoginService();
+
+    /**
+     * Gets the ObjectName of the KeystoreManager associated with this
+     * J2EEServer.
+     *
+     * @see org.apache.geronimo.security.keystore.KeystoreManager
+     *
+     * @return The ObjectName of the KeystoreManager, in String form.
+     */
+    public String getKeystoreManager();
+
 }

Modified: geronimo/trunk/modules/security/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/project.xml?rev=388236&r1=388235&r2=388236&view=diff
==============================================================================
--- geronimo/trunk/modules/security/project.xml (original)
+++ geronimo/trunk/modules/security/project.xml Thu Mar 23 11:20:22 2006
@@ -50,6 +50,15 @@
 
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-util</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-interceptor</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>



Mime
View raw message