Revision: 1132
          http://stripes.svn.sourceforge.net/stripes/?rev=1132&view=rev
Author:   mongus
Date:     2009-06-10 20:16:36 +0000 (Wed, 10 Jun 2009)

Log Message:
-----------
minor changes to allow Stripes to run on Google App Engine STS-689

Modified Paths:
--------------
    
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/NameBasedActionResolver.java
    
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/multipart/DefaultMultipartWrapperFactory.java

Added Paths:
-----------
    
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/DefaultViewActionBean.java

Added: 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/DefaultViewActionBean.java
===================================================================
--- 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/DefaultViewActionBean.java
                            (rev 0)
+++ 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/DefaultViewActionBean.java
    2009-06-10 20:16:36 UTC (rev 1132)
@@ -0,0 +1,29 @@
+package net.sourceforge.stripes.controller;
+
+import net.sourceforge.stripes.action.ActionBean;
+import net.sourceforge.stripes.action.ActionBeanContext;
+import net.sourceforge.stripes.action.Resolution;
+
+/**
+ * <p>A special purpose ActionBean that is used by the NameBasedActionResolver 
when a valid
+ * ActionBean cannot be found for a URL.  If the URL can be successfully 
translated into a
+ * JSP URL and a JSP exists, an instance of this ActionBean is created that 
will forward the
+ * user to the appropriate JSP.</p>
+ *
+ * <p>Because this ActionBean does not have a default no-arg constructor, even 
though it
+ * gets bound to a URL, if that URL is hit the ActionBean cannot be 
instantiated and therefore
+ * cannot be accessed directly by a user playing with the URL.</p>
+ *
+ * @author Tim Fennell, Abdullah Jibaly
+ * @since Stripes 1.3
+ */
+public class DefaultViewActionBean implements ActionBean {
+    private ActionBeanContext context;
+    private Resolution view;
+
+    public DefaultViewActionBean(Resolution view) { this.view = view; }
+    public void setContext(ActionBeanContext context) { this.context = 
context; }
+    public ActionBeanContext getContext() { return this.context; }
+
+    public Resolution view() { return view; }
+}
\ No newline at end of file

Modified: 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/NameBasedActionResolver.java
===================================================================
--- 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/NameBasedActionResolver.java
  2009-05-26 15:18:31 UTC (rev 1131)
+++ 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/NameBasedActionResolver.java
  2009-06-10 20:16:36 UTC (rev 1132)
@@ -387,27 +387,3 @@
         return attempts;
     }
 }
-
-/**
- * <p>A special purpose ActionBean that is used by the NameBasedActionResolver 
when a valid
- * ActionBean cannot be found for a URL.  If the URL can be successfully 
translated into a
- * JSP URL and a JSP exists, an instance of this ActionBean is created that 
will forward the
- * user to the appropriate JSP.</p>
- *
- * <p>Because this ActionBean does not have a default no-arg constructor, even 
though it
- * gets bound to a URL, if that URL is hit the ActionBean cannot be 
instantiated and therefore
- * cannot be accessed directly by a user playing with the URL.</p>
- *
- * @author Tim Fennell, Abdullah Jibaly
- * @since Stripes 1.3
- */
-class DefaultViewActionBean implements ActionBean {
-    private ActionBeanContext context;
-    private Resolution view;
-
-    public DefaultViewActionBean(Resolution view) { this.view = view; }
-    public void setContext(ActionBeanContext context) { this.context = 
context; }
-    public ActionBeanContext getContext() { return this.context; }
-
-    public Resolution view() { return view; }
-}

Modified: 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/multipart/DefaultMultipartWrapperFactory.java
===================================================================
--- 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/multipart/DefaultMultipartWrapperFactory.java
 2009-05-26 15:18:31 UTC (rev 1131)
+++ 
branches/1.5.x/stripes/src/net/sourceforge/stripes/controller/multipart/DefaultMultipartWrapperFactory.java
 2009-06-10 20:16:36 UTC (rev 1132)
@@ -98,7 +98,16 @@
             this.temporaryDirectory = tempDir;
         }
         else {
-            this.temporaryDirectory = new 
File(System.getProperty("java.io.tmpdir")).getAbsoluteFile();
+            String tmpDir = System.getProperty("java.io.tmpdir");
+            
+            if (tmpDir != null) {
+                this.temporaryDirectory = new File(tmpDir).getAbsoluteFile();
+            }
+            else {
+                log.warn("The tmpdir system property was null! File uploads 
will probably fail. ",
+                         "This is normal if you are running on Google App 
Engine as it doesn't allow ",
+                         "file system access.");
+            }
         }
 
         // See if a maximum post size was configured


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to