struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r476374 - in /struts/struts2/trunk/core/src/main: java/org/apache/struts2/config/PropertiesSettings.java resources/struts-default.xml
Date Fri, 17 Nov 2006 23:54:54 GMT
Author: mrdon
Date: Fri Nov 17 15:54:54 2006
New Revision: 476374

URL: http://svn.apache.org/viewvc?view=rev&rev=476374
Log:
Fixed NPE when struts.properties is missing, made multipart optional since fileupload isn't
always available
WW-1498

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
    struts/struts2/trunk/core/src/main/resources/struts-default.xml

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java?view=diff&rev=476374&r1=476373&r2=476374
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
Fri Nov 17 15:54:54 2006
@@ -56,6 +56,7 @@
         
         if (settingsUrl == null) {
             LOG.debug(name + ".properties missing");
+            settings = new LocatableProperties();
             return;
         }
         

Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/struts-default.xml?view=diff&rev=476374&r1=476373&r2=476374
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/struts2/trunk/core/src/main/resources/struts-default.xml Fri Nov 17 15:54:54 2006
@@ -20,8 +20,8 @@
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="restful" class="org.apache.struts2.dispatcher.mapper.RestfulActionMapper"
/>
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="restful2" class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper"
/>
     
-    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="struts"
class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default"/>
-    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="jakarta"
class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default"/>
+    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="struts"
class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default" optional="true"/>
+    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="jakarta"
class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default" optional="true"
/>
     
     <bean class="org.apache.struts2.views.freemarker.FreemarkerManager" name="struts"
optional="true"/>
     <bean class="org.apache.struts2.views.velocity.VelocityManager" name="struts" optional="true"
/>



Mime
View raw message