geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1004544 - /geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java
Date Tue, 05 Oct 2010 07:19:13 GMT
Author: djencks
Date: Tue Oct  5 07:19:13 2010
New Revision: 1004544

URL: http://svn.apache.org/viewvc?rev=1004544&view=rev
Log:
handle MultipartConfig annotations

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java?rev=1004544&r1=1004543&r2=1004544&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/annotation/WebServletAnnotationMergeHandler.java
Tue Oct  5 07:19:13 2010
@@ -98,9 +98,14 @@ public class WebServletAnnotationMergeHa
                     }
                     newServlet.getIconMap().put(null, icon);
                 }
-                //TODO Figure out how to handle MultipartConfig annotation
                 MultipartConfig multipartConfig = cls.getAnnotation(MultipartConfig.class);
                 if (multipartConfig != null) {
+                    org.apache.openejb.jee.MultipartConfig mpc = new org.apache.openejb.jee.MultipartConfig();
+                    mpc.setFileSizeThreshold(multipartConfig.fileSizeThreshold());
+                    mpc.setLocation(multipartConfig.location());
+                    mpc.setMaxFileSize(multipartConfig.maxFileSize());
+                    mpc.setMaxRequestSize(multipartConfig.maxRequestSize());
+                    newServlet.setMultipartConfig(mpc);
                 }
                 webApp.getServlet().add(newServlet);
                 ServletMergeHandler.addServlet(newServlet, mergeContext);



Mime
View raw message