geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r616572 - in /geronimo/server/trunk/plugins/console: console-jetty/src/main/plan/plan.xml console-tomcat/src/main/plan/plan.xml plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java
Date Wed, 30 Jan 2008 00:37:27 GMT
Author: djencks
Date: Tue Jan 29 16:37:26 2008
New Revision: 616572

URL: http://svn.apache.org/viewvc?rev=616572&view=rev
Log:
GERONIMO-2311 Fix up plugin export, great patch from YunFeng Ma

Modified:
    geronimo/server/trunk/plugins/console/console-jetty/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/console/console-tomcat/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java

Modified: geronimo/server/trunk/plugins/console/console-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-jetty/src/main/plan/plan.xml?rev=616572&r1=616571&r2=616572&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-jetty/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/console/console-jetty/src/main/plan/plan.xml Tue Jan 29
16:37:26 2008
@@ -48,7 +48,7 @@
             </gbean>
             <gbean name="PlanExportForward" class="org.apache.geronimo.console.gbean.ContextForwardGBean"
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
                 <attribute name="portalPathPrefix">/plan-export</attribute>
-                <attribute name="portletContextPath">/console-base</attribute>
+                <attribute name="portletContextPath">/plugin</attribute>
                 <attribute name="portletServletPath">/plan-export</attribute>
             </gbean>
         </web-app>

Modified: geronimo/server/trunk/plugins/console/console-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-tomcat/src/main/plan/plan.xml?rev=616572&r1=616571&r2=616572&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-tomcat/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/console/console-tomcat/src/main/plan/plan.xml Tue Jan 29
16:37:26 2008
@@ -39,7 +39,7 @@
             <security-realm-name>geronimo-admin</security-realm-name>
             <gbean name="CARExportForward" class="org.apache.geronimo.console.gbean.ContextForwardGBean"
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
                 <attribute name="portalPathPrefix">/car-export</attribute>
-                <attribute name="portletContextPath">/console-base</attribute>
+                <attribute name="portletContextPath">/plugin</attribute>
                 <attribute name="portletServletPath">/car-export</attribute>
             </gbean>
             <gbean name="SVGForward" class="org.apache.geronimo.console.gbean.ContextForwardGBean"
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
@@ -49,7 +49,7 @@
             </gbean>
             <gbean name="PlanExportForward" class="org.apache.geronimo.console.gbean.ContextForwardGBean"
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
                 <attribute name="portalPathPrefix">/plan-export</attribute>
-                <attribute name="portletContextPath">/console-base</attribute>
+                <attribute name="portletContextPath">/plugin</attribute>
                 <attribute name="portletServletPath">/plan-export</attribute>
             </gbean>
         </web-app>

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java?rev=616572&r1=616571&r2=616572&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CARExportServlet.java
Tue Jan 29 16:37:26 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.car;
 
+import java.net.URLEncoder;
+
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
@@ -47,6 +49,8 @@
         ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
         try {
             response.setContentType("application/zip");
+            String filename = artifact.getArtifactId() + "-" + artifact.getVersion() + "."
+ artifact.getType();
+            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(filename,
"UTF-8"));
             store.exportConfiguration(artifact, response.getOutputStream());
         } catch (NoSuchConfigException e) {
             throw new ServletException("No such configuration '"+configId+"'");



Mime
View raw message