roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1042372 - in /roller/trunk: weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/ weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/ weblogger-webapp/src/main/webapp/WEB-INF/
Date Sun, 05 Dec 2010 15:23:33 GMT
Author: snoopdave
Date: Sun Dec  5 15:23:33 2010
New Revision: 1042372

URL: http://svn.apache.org/viewvc?rev=1042372&view=rev
Log:
Changes to enable Roller to work on Websphere 8
https://issues.apache.org/jira/browse/ROL-1896


Modified:
    roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/BootstrapFilter.java
    roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
    roller/trunk/weblogger-webapp/src/main/webapp/WEB-INF/web.xml

Modified: roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/BootstrapFilter.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/BootstrapFilter.java?rev=1042372&r1=1042371&r2=1042372&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/BootstrapFilter.java
(original)
+++ roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/BootstrapFilter.java
Sun Dec  5 15:23:33 2010
@@ -52,9 +52,11 @@ public class BootstrapFilter implements 
         
         log.debug("Entered "+request.getRequestURI());
         
-        if (!WebloggerFactory.isBootstrapped() &&
-                "auto".equals(WebloggerConfig.getProperty("installation.type")) &&
-                !isInstallUrl(request.getServletPath())) {
+        if ("auto".equals(WebloggerConfig.getProperty("installation.type"))
+                && !WebloggerFactory.isBootstrapped() 
+                && !isInstallUrl(request.getRequestURI())) {
+                    
+            log.debug("Forwarding to install page");
             
             // we doing an install, so forward to installer
             RequestDispatcher rd = context.getRequestDispatcher(
@@ -70,8 +72,11 @@ public class BootstrapFilter implements 
     
     
     private boolean isInstallUrl(String uri) {
-        return (uri != null && (uri.startsWith("/roller-ui/install") ||
-                uri.endsWith(".js") || uri.endsWith(".css")));
+        return (uri != null && (
+                   uri.endsWith("create.rol") 
+                || uri.endsWith("bootstrap.rol") 
+                || uri.endsWith(".js") 
+                || uri.endsWith(".css")));
     }
     
     

Modified: roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Install.java?rev=1042372&r1=1042371&r2=1042372&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
(original)
+++ roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
Sun Dec  5 15:23:33 2010
@@ -95,7 +95,10 @@ public class Install extends UIAction {
             setPageTitle("installer.database.upgrade.pageTitle");
             return UPGRADE_DATABASE;
         }
+        
         setPageTitle("installer.error.unknown.pageTitle");        
+        rootCauseException = new Exception("UNKNOWN ERROR");
+        rootCauseException.fillInStackTrace();
         return BOOTSTRAP;
     }
     
@@ -141,8 +144,10 @@ public class Install extends UIAction {
     
     
     public String bootstrap() {
+        log.info("ENTERING");
         
-        if(WebloggerFactory.isBootstrapped()) {
+        if (WebloggerFactory.isBootstrapped()) {
+            log.info("EXITING - already bootstrapped, forwarding to Roller");
             return SUCCESS;
         }
         
@@ -177,15 +182,21 @@ public class Install extends UIAction {
                     log.fatal("Roller Planet bootstrapping failed", t);
                 }
             }
-
+            log.info("EXITING - Bootstrap sucessful, forwarding to Roller");
             return SUCCESS;
             
         } catch (BootstrapException ex) {
+            log.error("BootstrapException", ex);
             rootCauseException = ex;
         } catch (WebloggerException ex) {
+            log.error("WebloggerException", ex);
             rootCauseException = ex;
+        } catch (Throwable t) {
+            log.error("Throwable", t);
+            rootCauseException = t;
         }
         
+        log.info("EXITING - Bootstrap failed, forwarding to error page");
         setPageTitle("installer.error.unknown.pageTitle");                
         return BOOTSTRAP;
     }
@@ -198,7 +209,7 @@ public class Install extends UIAction {
         try {
             con = WebloggerStartup.getDatabaseProvider().getConnection();
             name = con.getMetaData().getDatabaseProductName();
-        } catch (Exception intentionallyIgnored) {
+    } catch (Exception intentionallyIgnored) {
             // ignored
         } finally {
             if(con != null) try {

Modified: roller/trunk/weblogger-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-webapp/src/main/webapp/WEB-INF/web.xml?rev=1042372&r1=1042371&r2=1042372&view=diff
==============================================================================
--- roller/trunk/weblogger-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ roller/trunk/weblogger-webapp/src/main/webapp/WEB-INF/web.xml Sun Dec  5 15:23:33 2010
@@ -176,14 +176,14 @@
     <!-- Struts2 -->
     <filter-mapping>
         <filter-name>struts2-cleanup</filter-name>
-        <url-pattern>/*</url-pattern>
+        <url-pattern>*.rol</url-pattern>
         <dispatcher>REQUEST</dispatcher>
         <dispatcher>FORWARD</dispatcher>
     </filter-mapping>
 
     <filter-mapping>
         <filter-name>struts2</filter-name>
-        <url-pattern>/*</url-pattern>
+        <url-pattern>*.rol</url-pattern>
         <dispatcher>REQUEST</dispatcher>
         <dispatcher>FORWARD</dispatcher>
     </filter-mapping>



Mime
View raw message