geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r781081 [1/4] - in /geronimo/server/branches/2.1: plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/ plugins/console/console-base-portl...
Date Tue, 02 Jun 2009 17:01:01 GMT
Author: dwoods
Date: Tue Jun  2 17:00:57 2009
New Revision: 781081

URL: http://svn.apache.org/viewvc?rev=781081&view=rev
Log:
GERONIMO-4532 Port the GERONIMO-4484 patches from V2.2 to V2.1 - Extraction, localization and display of messages generated in portlets.  Patches contributed by Kan Ogawa.

Added:
    geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/i18n/ConsoleResource_ja.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessageTag.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.css   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/images/arrow_collapsed.gif   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/images/arrow_expanded.gif   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/images/msg_error.gif   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/images/msg_info.gif   (with props)
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/images/msg_warn.gif   (with props)
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/CommonMsg.tld   (with props)
Modified:
    geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
    geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/BaseCAHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertificationAuthorityPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/BaseKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/CertificateDetailsHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/KeystoresPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ListHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ViewKeystoreHandler.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/_header.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/caDetails.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/certReqDetails.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/confirmCA.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/confirmCertReq.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/confirmClientCert.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/index.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/listRequestsIssue.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/listRequestsVerify.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/processCSR.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/setupCA.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/unlockCA.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/ca/viewCertificate.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/_header.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/certificateDetails.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/changePassword.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/index.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/unlockKey.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/unlockKeystore.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/keystore/viewKeystore.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/se/groups/maximized.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/se/users/maximized.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/servermanager/normal.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
    geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/normal.jsp
    geronimo/server/branches/2.1/plugins/console/console-core/pom.xml
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java
    geronimo/server/branches/2.1/plugins/console/console-core/src/main/java/org/apache/geronimo/console/MultiPageAbstractHandler.java
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/head.jsp
    geronimo/server/branches/2.1/plugins/console/console-portal-driver/src/main/webapp/loginerror.jsp
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/resources/portletinfo.properties
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/results.jsp
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp
    geronimo/server/branches/2.1/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/pom.xml
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/resources/portletinfo.properties
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
    geronimo/server/branches/2.1/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/AbstractHandler.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/CreatePlanPortlet.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/JSR88_Util.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/resources/portletinfo.properties
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/view/configcreator/deployStatus.jsp
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/view/configcreator/getArchive.jsp
    geronimo/server/branches/2.1/plugins/plancreator/plancreator-portlets/src/main/webapp/WEB-INF/view/configcreator/references.jsp
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo.properties
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/portlet.xml
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp
    geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
    geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
    geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java

Modified: geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java Tue Jun  2 17:00:57 2009
@@ -52,6 +52,7 @@
 import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
 import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapterInstance;
 import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageAbstractHandler;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.console.jmsmanager.ManagementHelper;
@@ -102,6 +103,10 @@
         super(mode, viewName);
     }
 
+    public AbstractHandler(String mode, String viewName, BasePortlet portlet) {
+        super(mode, viewName, portlet);
+    }
+
     public static class JMSResourceData implements MultiPageModel {
         private String rarURI;
         private String dependency;

Added: geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld?rev=781081&view=auto
==============================================================================
--- geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld (added)
+++ geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld Tue Jun  2 17:00:57 2009
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC
+  "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at 
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed  under the  License is distributed on an "AS IS" BASIS,
+WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<taglib>
+  
+  <tlibversion>1.0</tlibversion>
+  <jspversion>1.1</jspversion>
+  <shortname>pluto</shortname>
+  <uri>http://portals.apache.org/pluto</uri>
+
+    <tag>
+        <name>commonMsg</name>
+        <tagclass>
+            org.apache.geronimo.console.message.CommonMessageTag
+        </tagclass>
+        <bodycontent>empty</bodycontent>
+    </tag>
+
+</taglib>
+

Propchange: geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/CommonMsg.tld
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/portlet.xml?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/portlet.xml (original)
+++ geronimo/server/branches/2.1/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/portlet.xml Tue Jun  2 17:00:57 2009
@@ -34,6 +34,9 @@
             <portlet-mode>HELP</portlet-mode>
         </supports>
         <supported-locale>en</supported-locale>
+        <supported-locale>zh</supported-locale>
+        <supported-locale>ja</supported-locale>
+        <resource-bundle>portletinfo</resource-bundle>
         <portlet-info>
             <title>JMS Server Manager</title>
             <short-title>JMS Servers</short-title>
@@ -53,6 +56,9 @@
             <portlet-mode>HELP</portlet-mode>
         </supports>
         <supported-locale>en</supported-locale>
+        <supported-locale>zh</supported-locale>
+        <supported-locale>ja</supported-locale>
+        <resource-bundle>portletinfo</resource-bundle>
         <portlet-info>
             <title>JMS Network Listeners</title>
             <short-title>JMS Listeners</short-title>
@@ -71,6 +77,9 @@
             <portlet-mode>VIEW</portlet-mode>
         </supports>
         <supported-locale>en</supported-locale>
+        <supported-locale>zh</supported-locale>
+        <supported-locale>ja</supported-locale>
+        <resource-bundle>portletinfo</resource-bundle>
         <portlet-info>
             <title>JMS Resources</title>
             <short-title>JMS Resources</short-title>

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/BaseCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/BaseCAHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/BaseCAHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/BaseCAHandler.java Tue Jun  2 17:00:57 2009
@@ -23,6 +23,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageAbstractHandler;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.console.util.PortletManager;
@@ -63,11 +64,6 @@
     // Certificate request store directory
     protected static final String defaultCSRStoreDir = "var/security/ca/requests";
 
-    // Name of the attribute for error message to be displayed in a page
-    protected static final String ERROR_MSG = "errorMsg";
-    // Name of the attribute for information message to be displayed in a page
-    protected static final String INFO_MSG = "infoMsg";
-
     /**
      * Constructor
      */
@@ -75,6 +71,10 @@
         super(mode, viewName);
     }
 
+    protected BaseCAHandler(String mode, String viewName, BasePortlet portlet) {
+        super(mode, viewName, portlet);
+    }
+
     public final static class CAModel implements MultiPageModel {
         public CAModel(PortletRequest request) {
         }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java Tue Jun  2 17:00:57 2009
@@ -32,6 +32,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 import org.apache.geronimo.crypto.CaUtils;
@@ -44,25 +45,15 @@
  */
 public class CADetailsHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(CADetailsHandler.class);
-    public CADetailsHandler() {
-        super(CADETAILS_MODE, "/WEB-INF/view/ca/caDetails.jsp");
+    public CADetailsHandler(BasePortlet portlet) {
+        super(CADETAILS_MODE, "/WEB-INF/view/ca/caDetails.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
         try {
             CertificationAuthority ca = getCertificationAuthority(request);
             if(ca == null) {
@@ -89,7 +80,7 @@
             fingerPrints.put("SHA1", CertificateUtil.generateFingerprint(caCert, "SHA1"));
             request.setAttribute("fingerPrints", fingerPrints);
         } catch (Exception e) {
-            request.setAttribute(ERROR_MSG, e.toString());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg15"), e.getMessage());
             log.error("Errors while trying to view CA Details.", e);
         }
     }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java Tue Jun  2 17:00:57 2009
@@ -33,6 +33,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 
@@ -43,12 +44,12 @@
  */
 public class CertReqDetailsHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(CertReqDetailsHandler.class);
-    public CertReqDetailsHandler() {
-        super(CERT_REQ_DETAILS_MODE, "/WEB-INF/view/ca/certReqDetails.jsp");
+    public CertReqDetailsHandler(BasePortlet portlet) {
+        super(CERT_REQ_DETAILS_MODE, "/WEB-INF/view/ca/certReqDetails.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "algorithm", "sNo", "validFrom", "validTo", "pkcs10certreq", "subject", "publickey", "requestId"};
+        String[] params = {"algorithm", "sNo", "validFrom", "validTo", "pkcs10certreq", "subject", "publickey", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -62,14 +63,14 @@
                 response.setRenderParameter("sNo", sNo);
             } catch (Exception e) {
                 log.error("Unable to get next serial number from CA.", e);
-                response.setRenderParameter(ERROR_MSG, e.toString());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg21"), e.getMessage());
             }
         }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "subject", "publickey", "sNo", "validFrom", "validTo", "algorithm", "pkcs10certreq", "requestId"};
+        String[] params = {"subject", "publickey", "sNo", "validFrom", "validTo", "algorithm", "pkcs10certreq", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             Object value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -115,11 +116,9 @@
             // Go to client certificate confirmation page
             return CONFIRM_CLIENT_CERT_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg22"), e.getMessage());
             log.error("Errors in user input while processing a CSR.", e);
         }
-        
-        if(errorMsg != null) response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertificationAuthorityPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertificationAuthorityPortlet.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertificationAuthorityPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertificationAuthorityPortlet.java Tue Jun  2 17:00:57 2009
@@ -32,18 +32,18 @@
 public class CertificationAuthorityPortlet extends MultiPagePortlet {
     public void init(PortletConfig config) throws PortletException {
         super.init(config);
-        addHelper(new IntroHandler(), config);
-        addHelper(new SetupCAHandler(), config);
-        addHelper(new ConfirmCAHandler(), config);
-        addHelper(new CADetailsHandler(), config);
-        addHelper(new UnlockCAHandler(), config);
-        addHelper(new ProcessCSRHandler(), config);
-        addHelper(new CertReqDetailsHandler(), config);
-        addHelper(new ConfirmClientCertHandler(), config);
-        addHelper(new ViewCertificateHandler(), config);
-        addHelper(new ListRequestsIssueHandler(), config);
-        addHelper(new ListRequestsVerifyHandler(), config);
-        addHelper(new ConfirmCertReqHandler(), config);
+        addHelper(new IntroHandler(this), config);
+        addHelper(new SetupCAHandler(this), config);
+        addHelper(new ConfirmCAHandler(this), config);
+        addHelper(new CADetailsHandler(this), config);
+        addHelper(new UnlockCAHandler(this), config);
+        addHelper(new ProcessCSRHandler(this), config);
+        addHelper(new CertReqDetailsHandler(this), config);
+        addHelper(new ConfirmClientCertHandler(this), config);
+        addHelper(new ViewCertificateHandler(this), config);
+        addHelper(new ListRequestsIssueHandler(this), config);
+        addHelper(new ListRequestsVerifyHandler(this), config);
+        addHelper(new ConfirmCertReqHandler(this), config);
     }
 
     protected String getModelJSPVariableName() {

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java Tue Jun  2 17:00:57 2009
@@ -21,6 +21,7 @@
 import java.math.BigInteger;
 import java.net.URI;
 import java.text.DateFormat;
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
@@ -33,6 +34,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.gbean.AbstractName;
@@ -56,12 +58,12 @@
  */
 public class ConfirmCAHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ConfirmCAHandler.class);
-    public ConfirmCAHandler() {
-        super(CONFIRM_CA_MODE, "/WEB-INF/view/ca/confirmCA.jsp");
+    public ConfirmCAHandler(BasePortlet portlet) {
+        super(CONFIRM_CA_MODE, "/WEB-INF/view/ca/confirmCA.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
+        String[] params = {"caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -70,7 +72,7 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
+        String[] params = {"caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -92,7 +94,6 @@
         String validFrom = request.getParameter("validFrom");
         String validTo = request.getParameter("validTo");
         String sNo = request.getParameter("sNo");
-        String errorMsg = null;
         
         try {
             // Generate keypair
@@ -128,17 +129,15 @@
             
             // CA Setup is succeessful.
             // Load a page to show CA details.
-            response.setRenderParameter(INFO_MSG, "CA Setup is successful!");
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg15"));
             log.info("CA Setup is successful.");
             
             return CADETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            // An error occurred.  Go back to CA details entry page so that user can correct the errors.
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "infoMsg07"), e.getMessage());
             log.error("Errors in CA Setup process.", e);
         }
-        
-        // An error occurred.  Go back to CA details entry page so that user can correct the errors.
-        if(errorMsg != null) response.setRenderParameter(ERROR_MSG, errorMsg);
         return SETUPCA_MODE+BEFORE_ACTION;
     }
     

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java Tue Jun  2 17:00:57 2009
@@ -18,6 +18,7 @@
 package org.apache.geronimo.console.ca;
 
 import java.io.IOException;
+import java.text.MessageFormat;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -25,6 +26,7 @@
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 
 /**
@@ -33,12 +35,12 @@
  * @version $Rev$ $Date$
  */
 public class ConfirmCertReqHandler extends BaseCAHandler {
-    public ConfirmCertReqHandler() {
-        super(CONFIRM_CERT_REQ_MODE, "/WEB-INF/view/ca/confirmCertReq.jsp");
+    public ConfirmCertReqHandler(BasePortlet portlet) {
+        super(CONFIRM_CERT_REQ_MODE, "/WEB-INF/view/ca/confirmCertReq.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "subject", "publickey", "requestId"};
+        String[] params = {"subject", "publickey", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -47,7 +49,7 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "subject", "publickey", "requestId"};
+        String[] params = {"subject", "publickey", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -60,10 +62,10 @@
         String reject = request.getParameter("reject");
         if(approve != null) {
             getCertificateRequestStore(request).setRequestVerified(requestId);
-            response.setRenderParameter(INFO_MSG, "Approved CSR. id = "+requestId);
+            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg16"), requestId));            
         } else if(reject != null) {
             getCertificateRequestStore(request).deleteRequest(requestId);
-            response.setRenderParameter(INFO_MSG, "Rejected and deleted CSR. id = "+requestId);
+            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg17"), requestId));
         }
         return LIST_REQUESTS_VERIFY_MODE+BEFORE_ACTION;
     }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java Tue Jun  2 17:00:57 2009
@@ -22,6 +22,7 @@
 import java.math.BigInteger;
 import java.security.PublicKey;
 import java.text.DateFormat;
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Map;
@@ -36,6 +37,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 import org.apache.geronimo.crypto.CaUtils;
@@ -48,12 +50,12 @@
  */
 public class ConfirmClientCertHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ConfirmClientCertHandler.class);
-    public ConfirmClientCertHandler() {
-        super(CONFIRM_CLIENT_CERT_MODE, "/WEB-INF/view/ca/confirmClientCert.jsp");
+    public ConfirmClientCertHandler(BasePortlet portlet) {
+        super(CONFIRM_CLIENT_CERT_MODE, "/WEB-INF/view/ca/confirmClientCert.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "subject", "publickey", "algorithm", "validFrom", "validTo", "sNo", "pkcs10certreq", "requestId"};
+        String[] params = {"subject", "publickey", "algorithm", "validFrom", "validTo", "sNo", "pkcs10certreq", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -62,7 +64,7 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "subject", "publickey", "algorithm", "validFrom", "validTo", "sNo", "pkcs10certreq", "requestId"};
+        String[] params = {"subject", "publickey", "algorithm", "validFrom", "validTo", "sNo", "pkcs10certreq", "requestId"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -70,7 +72,6 @@
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         try {
             CertificationAuthority ca = getCertificationAuthority(request);
             if(ca == null) {
@@ -81,9 +82,7 @@
                 // A certificate with the serial number has already been issued.
                 // This may happen if the user clicks on "Issue Certificate" button a second time
                 log.warn("Second request to issue certificate with serial number'"+sNo+"'.  A certificate has already been issued.");
-                response.setRenderParameter("sNo", sNo.toString());
-                response.setRenderParameter(INFO_MSG, "A certificate with the serial number '"+sNo+"' has already been issued. "
-                        +"You may be seeing this message since you have clicked on 'Issue Certificate' button a second time.");
+                portlet.addWarningMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "warnMsg06"), sNo));                
                 return VIEW_CERT_MODE;
             }
 
@@ -153,16 +152,14 @@
 
             // Set the serial number and forward to view certificate page
             response.setRenderParameter("sNo", sNo.toString());
-            response.setRenderParameter(INFO_MSG, "Certificate Issued successfully. This Certificate details can also be viewed using the serial number '"
-                    +sNo+"' with the 'View Issued Certificate' link provided in the CA home screen.");
+            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg18"), sNo));
             log.info("Certificate with serial number '"+sNo+"' issued to "+subject);
             return VIEW_CERT_MODE;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            // An error occurred.  Go back to previous screen to let the user correct the errors.
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg23"), e.getMessage());
             log.error("Errors in issuing certificate.", e);
         }
-        // An error occurred.  Go back to previous screen to let the user correct the errors.
-        response.setRenderParameter(ERROR_MSG, errorMsg);
         return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java Tue Jun  2 17:00:57 2009
@@ -27,6 +27,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 
@@ -37,26 +38,15 @@
  */
 public class IntroHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(IntroHandler.class);
-    public IntroHandler() {
-        super(INDEX_MODE, "/WEB-INF/view/ca/index.jsp");
+    public IntroHandler(BasePortlet portlet) {
+        super(INDEX_MODE, "/WEB-INF/view/ca/index.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = new String[] {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
-        
         CertificationAuthority ca = getCertificationAuthority(request);
         if(ca == null) {
             // CA GBean is not running or the CA has not been initialized.
@@ -72,20 +62,20 @@
             CertificationAuthority ca = getCertificationAuthority(request);
             if(ca == null) {
                 log.warn("CA is not running or CA may not have been initialized.  Unable to lock CA.");
-                response.setRenderParameter(ERROR_MSG, "CA is not running or CA may not have been initialized.  Unable to lock CA.");
+                portlet.addWarningMessage(request, portlet.getLocalizedString(request, "warnMsg05"));
             } else {
                 ca.lock();
                 log.info("CA is now locked.");
-                response.setRenderParameter(INFO_MSG, "CA has been locked!");
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg12"));
             }
         } else if(request.getParameter("publish") != null) {
             CertificationAuthority ca = getCertificationAuthority(request);
             try {
                 getCertificateStore(request).storeCACertificate(ca.getCertificate());
-                response.setRenderParameter(INFO_MSG, "CA's certificate published to Certificate Store");
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg13"));
             } catch (Exception e) {
                 log.error("Error while publishing CA's certificate to Certificate Store", e);
-                response.setRenderParameter(ERROR_MSG, "Error while publishing CA's certificate to Certificate Store. "+e);
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg13"), e.getMessage());
             }
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java Tue Jun  2 17:00:57 2009
@@ -19,6 +19,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.text.MessageFormat;
 import java.util.Map;
 import java.util.Properties;
 
@@ -30,6 +31,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificateRequestStore;
 import org.apache.geronimo.crypto.CaUtils;
@@ -42,32 +44,21 @@
  */
 public class ListRequestsIssueHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ListRequestsIssueHandler.class);
-    public ListRequestsIssueHandler() {
-        super(LIST_REQUESTS_ISSUE_MODE, "/WEB-INF/view/ca/listRequestsIssue.jsp");
+    public ListRequestsIssueHandler(BasePortlet portlet) {
+        super(LIST_REQUESTS_ISSUE_MODE, "/WEB-INF/view/ca/listRequestsIssue.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
         CertificateRequestStore csrStore = getCertificateRequestStore(request);
         String[] csrIds = csrStore.getVerifiedRequestIds();
         request.setAttribute("csrIds", csrIds);
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         String requestId = request.getParameter("requestId");
         try {
             response.setRenderParameter("requestId", requestId);
@@ -98,10 +89,9 @@
             }
             return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg17"), requestId), e.getMessage());
             log.error("Errors while processing a Certificate Request. id="+requestId, e);
         }
-        response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java Tue Jun  2 17:00:57 2009
@@ -19,6 +19,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.text.MessageFormat;
 import java.util.Map;
 import java.util.Properties;
 
@@ -30,6 +31,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificateRequestStore;
 import org.apache.geronimo.crypto.CaUtils;
@@ -42,32 +44,21 @@
  */
 public class ListRequestsVerifyHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ListRequestsVerifyHandler.class);
-    public ListRequestsVerifyHandler() {
-        super(LIST_REQUESTS_VERIFY_MODE, "/WEB-INF/view/ca/listRequestsVerify.jsp");
+    public ListRequestsVerifyHandler(BasePortlet portlet) {
+        super(LIST_REQUESTS_VERIFY_MODE, "/WEB-INF/view/ca/listRequestsVerify.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
         CertificateRequestStore csrStore = getCertificateRequestStore(request);
         String[] csrIds = csrStore.getVerificatonDueRequestIds();
         request.setAttribute("csrIds", csrIds);
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         String requestId = request.getParameter("requestId");
         try {
             response.setRenderParameter("requestId", requestId);
@@ -98,10 +89,9 @@
             }
             return CONFIRM_CERT_REQ_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg18"), requestId), e.getMessage());
             log.error("Errors while verifying Certificate Request. id="+requestId, e);
         }
-        response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java Tue Jun  2 17:00:57 2009
@@ -28,6 +28,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.crypto.CaUtils;
 
@@ -38,29 +39,18 @@
  */
 public class ProcessCSRHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ProcessCSRHandler.class);
-    public ProcessCSRHandler() {
-        super(PROCESS_CSR_MODE, "/WEB-INF/view/ca/processCSR.jsp");
+    public ProcessCSRHandler(BasePortlet portlet) {
+        super(PROCESS_CSR_MODE, "/WEB-INF/view/ca/processCSR.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            Object value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         try {
             // Process the PKCS10 Certificate Request
             String pkcs10certreq = request.getParameter("pkcs10certreq");
@@ -71,10 +61,9 @@
             response.setRenderParameter("publickey", certReqMap.get(CaUtils.CERT_REQ_PUBLICKEY_OBJ).toString());
             return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg20"), e.getMessage());
             log.error("Errors while processing a CSR.", e);
         }
-        response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java Tue Jun  2 17:00:57 2009
@@ -33,6 +33,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 
 /**
@@ -42,12 +43,12 @@
  */
 public class SetupCAHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(SetupCAHandler.class);
-    public SetupCAHandler() {
-        super(SETUPCA_MODE, "/WEB-INF/view/ca/setupCA.jsp");
+    public SetupCAHandler(BasePortlet portlet) {
+        super(SETUPCA_MODE, "/WEB-INF/view/ca/setupCA.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo"};
+        String[] params = {"caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -56,7 +57,7 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo"};
+        String[] params = {"caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo"};
         for(int i = 0; i < params.length; ++i) {
             Object value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -64,7 +65,6 @@
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         try {
             // Validate the Serial Number
             String sNo = request.getParameter("sNo");
@@ -101,10 +101,9 @@
             // Load page to confirm CA details
             return CONFIRM_CA_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg19"), e.getMessage());
             log.error("Error in user input during CA Setup.", e);
         }
-        if(errorMsg != null) response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java Tue Jun  2 17:00:57 2009
@@ -27,6 +27,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 
@@ -37,29 +38,18 @@
  */
 public class UnlockCAHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(UnlockCAHandler.class);
-    public UnlockCAHandler() {
-        super(UNLOCKCA_MODE, "/WEB-INF/view/ca/unlockCA.jsp");
+    public UnlockCAHandler(BasePortlet portlet) {
+        super(UNLOCKCA_MODE, "/WEB-INF/view/ca/unlockCA.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) response.setRenderParameter(params[i], value);
-        }
         return getMode();
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            Object value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String errorMsg = null;
         try {
             String password = request.getParameter("password");
             if(password == null) {
@@ -72,15 +62,14 @@
             ca.unlock(password.toCharArray());
 
             // Return to CA's index page
-            response.setRenderParameter(INFO_MSG, "CA has been unlocked successfully!");
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg14"));
             log.info("CA has been unlocked successfully!");
             return INDEX_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            errorMsg = e.toString();
+            // An error occurred.  Set the error message and load the page again.
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg14"), e.getMessage());
             log.error("Errors in unlocking CA.", e);
         }
-        // An error occurred.  Set the error message and load the page again.
-        response.setRenderParameter(ERROR_MSG, errorMsg);
         return getMode()+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java Tue Jun  2 17:00:57 2009
@@ -22,6 +22,7 @@
 import java.security.PublicKey;
 import java.security.cert.Certificate;
 import java.security.interfaces.RSAPublicKey;
+import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,6 +34,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.CertificationAuthority;
 import org.apache.geronimo.crypto.CertificateUtil;
@@ -44,12 +46,12 @@
  */
 public class ViewCertificateHandler extends BaseCAHandler {
     private final static Log log = LogFactory.getLog(ViewCertificateHandler.class);
-    public ViewCertificateHandler() {
-        super(VIEW_CERT_MODE, "/WEB-INF/view/ca/viewCertificate.jsp");
+    public ViewCertificateHandler(BasePortlet portlet) {
+        super(VIEW_CERT_MODE, "/WEB-INF/view/ca/viewCertificate.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "sNo"};
+        String[] params = {"sNo"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -58,12 +60,6 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
-        String errorMsg = request.getParameter(ERROR_MSG);
         String sNo = request.getParameter("sNo");
         try {
             if(!request.getParameterMap().containsKey("sNo")) {
@@ -94,10 +90,9 @@
             if("true".equalsIgnoreCase(request.getParameter("linkToListRequests")))
                 request.setAttribute("linkToListRequests", Boolean.TRUE);
         } catch (Exception e) {
-            errorMsg = e.toString();
+            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg16"), sNo), e.getMessage());
             log.error("Errors trying to view certificate with serial number '"+sNo+"'", e);
         }
-        request.setAttribute(ERROR_MSG, errorMsg);
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Tue Jun  2 17:00:57 2009
@@ -123,19 +123,20 @@
         return kids;
     }
 
-    public void printResults(Set<Artifact> lcresult, StringBuffer buf) {
+    public String printResults(Set<Artifact> lcresult) {
+        StringBuilder sb = new StringBuilder();
         for (Artifact config : lcresult) {
 
-            //TODO might be a hack
+            // TODO might be a hack
             List<String> kidsChild = loadChildren(kernel, config.toString());
 
-            //TODO figure out the web url and show it when appropriate.
-            buf.append("    ").append(config).append("<br />");
-            for (String kid: kidsChild) {
-                buf.append("      `-> ").append(kid).append("<br />");
+            // TODO figure out the web url and show it when appropriate.
+            sb.append("<br />").append(config);
+            for (String kid : kidsChild) {
+                sb.append("<br />-> ").append(kid);
             }
-            buf.append("<br />");
         }
+        return sb.toString();
     }
 
     public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException {
@@ -152,7 +153,7 @@
                 }
                 if(!configurationManager.isRunning(configId)) {
                     org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager.startConfiguration(configId);
-                    message(actionResponse, lcresult, "Started application<br /><br />");
+                    addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg01") + printResults(lcresult.getStarted()));
                 }
             } else if (STOP_ACTION.equals(action)) {
                 if(configurationManager.isRunning(configId)) {
@@ -160,40 +161,32 @@
                 }
                 if(configurationManager.isLoaded(configId)) {
                     LifecycleResults lcresult = configurationManager.unloadConfiguration(configId);
-                    message(actionResponse, lcresult, "Stopped application<br /><br />");
+                    addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg02") + printResults(lcresult.getStarted()));
                 }
             } else if (UNINSTALL_ACTION.equals(action)) {
                 configurationManager.uninstallConfiguration(configId);
-                message(actionResponse, null, "Uninstalled application<br /><br />"+configId+"<br /><br />");
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg04") + "<br />" + configId);
             } else if (RESTART_ACTION.equals(action)) {
                 LifecycleResults lcresult = configurationManager.restartConfiguration(configId);
-                message(actionResponse, lcresult, "Restarted application<br /><br />");
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg03") + printResults(lcresult.getStarted()));
             } else {
-                message(actionResponse, null, "Invalid value for changeState: " + action + "<br /><br />");
+                addWarningMessage(actionRequest, getLocalizedString(actionRequest, "warnMsg01") + action + "<br />");
                 throw new PortletException("Invalid value for changeState: " + action);
             }
         } catch (NoSuchConfigException e) {
             // ignore this for now
-            message(actionResponse, null, "Configuration not found<br /><br />");
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg01"));
             log.error("Configuration not found", e);
         } catch (LifecycleException e) {
             // todo we have a much more detailed report now
-            message(actionResponse, null, "Lifecycle operation failed<br /><br />");
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg02"));
             log.error("Lifecycle operation failed ", e);
         } catch (Throwable e) {
-            message(actionResponse, null, "Encountered an unhandled exception<br /><br />");
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg03"));
             log.error("Exception", e);
         }
     }
 
-    private void message(ActionResponse actionResponse, LifecycleResults lcresult, String str) {
-        StringBuffer buf = new StringBuffer(str);
-        if (lcresult != null) {
-            this.printResults(lcresult.getStarted(), buf);
-        }
-        actionResponse.setRenderParameter("messageStatus", buf.toString());
-    }
-
     /**
      * Check if a configuration should be listed here. This method depends on the "config-type" portlet parameter
      * which is set in portle.xml.
@@ -319,11 +312,8 @@
         renderRequest.setAttribute("showWebInfo", Boolean.valueOf(showWebInfo()));
         renderRequest.setAttribute("showDependencies", Boolean.valueOf(showDependencies));
         if (moduleDetails.size() == 0) {
-            renderRequest.setAttribute("messageInstalled", "No modules found of this type<br /><br />");
-        } else {
-            renderRequest.setAttribute("messageInstalled", "");
+            addWarningMessage(renderRequest, getLocalizedString(renderRequest, "warnMsg02"));
         }
-        renderRequest.setAttribute("messageStatus", renderRequest.getParameter("messageStatus"));
         if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
             normalView.include(renderRequest, renderResponse);
         } else {

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/BaseKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/BaseKeystoreHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/BaseKeystoreHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/BaseKeystoreHandler.java Tue Jun  2 17:00:57 2009
@@ -32,6 +32,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageAbstractHandler;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.KeystoreException;
@@ -64,16 +65,14 @@
     protected static final String DELETE_ENTRY = "deleteEntry";
     protected static final String CHANGE_PASSWORD = "changePassword";
 
-    // Name of the attribute for error message to be displayed in a page
-    protected static final String ERROR_MSG = "errorMsg";
-    // Name of the attribute for information message to be displayed in a page
-    protected static final String INFO_MSG = "infoMsg";
-    
-
     protected BaseKeystoreHandler(String mode, String viewName) {
         super(mode, viewName);
     }
 
+    protected BaseKeystoreHandler(String mode, String viewName, BasePortlet portlet) {
+        super(mode, viewName, portlet);
+    }
+
     public final static class KeystoreModel implements MultiPageModel {
         public KeystoreModel(PortletRequest request) {
         }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/CertificateDetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/CertificateDetailsHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/CertificateDetailsHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/CertificateDetailsHandler.java Tue Jun  2 17:00:57 2009
@@ -46,11 +46,6 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
         String id = request.getParameter("id");
         String alias = request.getParameter("alias");
         if(alias == null && request.getParameterMap().containsKey("alias")) {

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java Tue Jun  2 17:00:57 2009
@@ -16,8 +16,11 @@
  */
 package org.apache.geronimo.console.keystores;
 
+import java.text.MessageFormat;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 
 import javax.portlet.ActionRequest;
@@ -34,12 +37,12 @@
  */
 public class ChangePasswordHandler extends BaseKeystoreHandler {
     private final static Log log = LogFactory.getLog(ChangePasswordHandler.class);
-    public ChangePasswordHandler() {
-        super(CHANGE_PASSWORD, "/WEB-INF/view/keystore/changePassword.jsp");
+    public ChangePasswordHandler(BasePortlet portlet) {
+        super(CHANGE_PASSWORD, "/WEB-INF/view/keystore/changePassword.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "keystore", "alias"};
+        String[] params = {"keystore", "alias"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) response.setRenderParameter(params[i], value);
@@ -48,7 +51,7 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG, "keystore", "alias"};
+        String[] params = {"keystore", "alias"};
         for(int i = 0; i < params.length; ++i) {
             String value = request.getParameter(params[i]);
             if(value != null) request.setAttribute(params[i], value);
@@ -76,19 +79,25 @@
                 // Keystore password is to be changed.
                 data.changeKeystorePassword(password.toCharArray(), newPassword.toCharArray());
                 response.setRenderParameter("id", keystore);
-                response.setRenderParameter(INFO_MSG, "Password changed for keystore '"+keystore+"'.");
+                portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg10"), keystore));
                 return VIEW_KEYSTORE+BEFORE_ACTION;
             } else {
                 // Private key password is to be changed.
                 data.changeKeyPassword(alias, password.toCharArray(), newPassword.toCharArray());
                 response.setRenderParameter("id", keystore);
                 response.setRenderParameter("alias", alias);
-                response.setRenderParameter(INFO_MSG, "Password changed for private key '"+alias+"'.");
+                portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg11"), alias));
                 return CERTIFICATE_DETAILS;
             }
         } catch (Exception e) {
-            String message = "Unable to change password for "+ (alias == null || alias.equals("") ? "keystore "+keystore : "private key "+alias) + ".";
-            response.setRenderParameter(ERROR_MSG, message+" "+e.toString());
+            String message = "";
+            if(alias == null || alias.equals("")) {
+                message = "Unable to change password for keystore " + keystore + ".";
+                portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg11"), keystore), e.getMessage());
+            } else {
+                message = "Unable to change password for private key " + alias + ".";
+                portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg12"), alias), e.getMessage());
+            }
             log.error(message, e);
             return getMode()+BEFORE_ACTION;
         }

Modified: geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java?rev=781081&r1=781080&r2=781081&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java Tue Jun  2 17:00:57 2009
@@ -16,8 +16,11 @@
  */
 package org.apache.geronimo.console.keystores;
 
+import java.text.MessageFormat;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.KeystoreException;
 
@@ -35,8 +38,8 @@
  */
 public class EditKeystoreHandler extends BaseKeystoreHandler {
     private final static Log log = LogFactory.getLog(EditKeystoreHandler.class);
-    public EditKeystoreHandler() {
-        super(UNLOCK_KEYSTORE_FOR_EDITING, "/WEB-INF/view/keystore/unlockKeystore.jsp");
+    public EditKeystoreHandler(BasePortlet portlet) {
+        super(UNLOCK_KEYSTORE_FOR_EDITING, "/WEB-INF/view/keystore/unlockKeystore.jsp", portlet);
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
@@ -48,11 +51,6 @@
     }
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
-        String[] params = {ERROR_MSG, INFO_MSG};
-        for(int i = 0; i < params.length; ++i) {
-            String value = request.getParameter(params[i]);
-            if(value != null) request.setAttribute(params[i], value);
-        }
         request.setAttribute("keystore", request.getParameter("keystore"));
         request.setAttribute("mode", "unlockEdit");
     }
@@ -71,11 +69,11 @@
         try {
             data.unlockEdit(storePass);
         } catch (KeystoreException e) {
-            response.setRenderParameter(ERROR_MSG, "Unable to unlock keystore "+keystore+" for editing. "+e.toString());
+            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "errorMsg08"), keystore), e.getMessage());
             log.error("Unable to unlock keystore "+keystore+" for editing.", e);
             return getMode()+BEFORE_ACTION;
         }
-        response.setRenderParameter(INFO_MSG, "Keystore "+keystore+" successfully unlocked for editing.");
+        portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString(request, "infoMsg05"), keystore));
         return LIST_MODE+BEFORE_ACTION;
     }
 }



Mime
View raw message