Added: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/UpgradeDatabase.java URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/UpgradeDatabase.java?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/UpgradeDatabase.java (added) +++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/UpgradeDatabase.java Sat Jun 16 06:52:09 2007 @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + */ + +package org.apache.roller.weblogger.ui.struts2.core; + +import com.opensymphony.xwork2.ActionSupport; +import java.sql.Connection; +import java.util.List; +import java.util.Map; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.roller.weblogger.WebloggerException; +import org.apache.roller.weblogger.business.DatabaseProvider; +import org.apache.roller.weblogger.business.utils.DatabaseScriptProvider; +import org.apache.roller.weblogger.business.utils.DatabaseUpgrader; +import org.apache.roller.weblogger.config.RollerConfig; +import org.apache.struts2.interceptor.ApplicationAware; + +/** + * Walk user through database auto-upgrade process. + */ +public class UpgradeDatabase extends ActionSupport implements ApplicationAware { + private static Log log = LogFactory.getLog(UpgradeDatabase.class); + + private DatabaseScriptProvider scripts = null; + private boolean error = false; + private List<String> messages = null; + + public String execute() { + return SUCCESS; + } + + /** + * Looks for DatabaseScriptProvider via key 'DatabaseScriptProvider' + */ + public void setApplication(Map map) { + if (map.get("DatabaseScriptProvider") != null) { + scripts = (DatabaseScriptProvider)map.get("DatabaseScriptProvider"); + } + } + + public String upgrade() { + DatabaseUpgrader upgrader = new DatabaseUpgrader(scripts); + try { + upgrader.upgradeDatabase(true); + } catch (Exception ex) { + log.error("ERROR running database upgrade scripts", ex); + error = true; + } + messages = upgrader.getMessages(); + return SUCCESS; + } + + public boolean isUpgradeRequired() { + try { + return DatabaseUpgrader.isUpgradeRequired(); + } catch (WebloggerException ex) { + log.error("ERROR determining if database upgrade required", ex); + } + return false; + } + + public List<String> getMessages() { + return messages; + } + + public boolean getError() { + return error; + } + + public String getProp(String key) { + // Static config only, we don't have database yet + String value = RollerConfig.getProperty(key); + return (value == null) ? key : value; + } + + public String getDatabaseProductName() { + String name = "error"; + try { + Connection con = DatabaseProvider.getDatabaseProvider().getConnection(); + name = con.getMetaData().getDatabaseProductName(); + } catch (Exception intentionallyIgnored) {} + return name; + } +} +
Modified: roller/trunk/apps/weblogger/src/sql/dbscripts.properties URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/sql/dbscripts.properties?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/src/sql/dbscripts.properties (original) +++ roller/trunk/apps/weblogger/src/sql/dbscripts.properties Sat Jun 16 06:52:09 2007 @@ -7,5 +7,5 @@ # list all db templates to generate, separated by spaces templates=createdb 200-to-210-migration 210-to-230-migration \ 230-to-240-migration 240-to-300-migration 300-to-310-migration \ -310-to-320-migration 3xx-to-400-migration +310-to-320-migration 320-to-400-migration Added: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/SQLScriptRunnerTest.java URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/SQLScriptRunnerTest.java?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/SQLScriptRunnerTest.java (added) +++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/SQLScriptRunnerTest.java Sat Jun 16 06:52:09 2007 @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + */ + +package org.apache.roller.weblogger.business; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import junit.framework.TestCase; +import org.apache.roller.weblogger.business.utils.SQLScriptRunner; + +/** + * Test parsing and running of SQL scripts + */ +public class SQLScriptRunnerTest extends TestCase { + + public void testParseOnly() throws Exception { + DatabaseProvider dbp = DatabaseProvider.getDatabaseProvider(); + Connection con = dbp.getConnection(); + + // normaly tests run against Derby + String databaseProductName = con.getMetaData().getDatabaseProductName(); + String dbname = "derby"; + if (databaseProductName.toLowerCase().indexOf("mysql") > 0) { + // but some folks test against MySQL + dbname = "mysql"; + } + + String scriptPath = "WEB-INF/dbscripts/dummydb/createdb-"+dbname+".sql"; + SQLScriptRunner runner = new SQLScriptRunner(scriptPath); + assertTrue(runner != null); + assertTrue(runner.getCommandCount() == 5); + } + + public void testSimpleRun() throws Exception { + DatabaseProvider dbp = DatabaseProvider.getDatabaseProvider(); + Connection con = dbp.getConnection(); + + // normaly tests run against Derby + String databaseProductName = con.getMetaData().getDatabaseProductName(); + String dbname = "derby"; + if (databaseProductName.toLowerCase().indexOf("mysql") > 0) { + // but some folks test against MySQL + dbname = "mysql"; + } + + // run script to create tables + SQLScriptRunner create = + new SQLScriptRunner("WEB-INF/dbscripts/dummydb/createdb-"+dbname+".sql"); + create.runScript(con, true); + + // check to ensure tables were created + assertTrue(tableExists(con, "testrolleruser")); + assertTrue(tableExists(con, "testuserrole")); + + // drop tables + SQLScriptRunner drop = + new SQLScriptRunner("WEB-INF/dbscripts/dummydb/droptables.sql"); + drop.runScript(con, false); + + // check to ensure tables were dropped + assertFalse(tableExists(con, "testrolleruser")); + assertFalse(tableExists(con, "testuserrole")); + } + + public static boolean tableExists(Connection con, String tableName) throws SQLException { + String[] types = {"TABLE"}; + ResultSet rs = con.getMetaData().getTables(null, null, "%", null); + while (rs.next()) { + if (tableName.toLowerCase().equals(rs.getString("TABLE_NAME").toLowerCase())) { + return true; + } + } + return false; + } +} Added: roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-derby.sql URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-derby.sql?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-derby.sql (added) +++ roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-derby.sql Sat Jun 16 06:52:09 2007 @@ -0,0 +1,25 @@ + +create table testrolleruser ( + id varchar(48) not null primary key, + username varchar(255) not null, + passphrase varchar(255) not null, + screenname varchar(255) not null, + fullname varchar(255) not null, + emailaddress varchar(255) not null, + activationcode varchar(48), + datecreated timestamp not null, + locale varchar(20), + timezone varchar(50), + isenabled smallint default 1 not null +); +alter table testrolleruser add constraint tru_username_uq unique ( username ); + +create table testuserrole ( + id varchar(48) not null primary key, + rolename varchar(255) not null, + username varchar(255) not null, + userid varchar(48) not null +); +create index tur_userid_idx on testuserrole( userid ); +create index tur_username_idx on testuserrole( username ); + Added: roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-mysql.sql URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-mysql.sql?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-mysql.sql (added) +++ roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/createdb-mysql.sql Sat Jun 16 06:52:09 2007 @@ -0,0 +1,25 @@ + +create table testrolleruser ( + id varchar(48) not null primary key, + username varchar(255) not null, + passphrase varchar(255) not null, + screenname varchar(255) not null, + fullname varchar(255) not null, + emailaddress varchar(255) not null, + activationcode varchar(48), + datecreated datetime not null, + locale varchar(20), + timezone varchar(50), + isenabled tinyint(1) default 1 not null +); +alter table testrolleruser add constraint tru_username_uq unique ( username(40) ); + +create table testuserrole ( + id varchar(48) not null primary key, + rolename varchar(255) not null, + username varchar(255) not null, + userid varchar(48) not null +); +create index tur_userid_idx on testuserrole( userid ); +create index tur_username_idx on testuserrole( username(40) ); + Added: roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/droptables.sql URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/droptables.sql?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/droptables.sql (added) +++ roller/trunk/apps/weblogger/testdata/WEB-INF/dbscripts/dummydb/droptables.sql Sat Jun 16 06:52:09 2007 @@ -0,0 +1,2 @@ +drop table testrolleruser; +drop table testuserrole; \ No newline at end of file Modified: roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties (original) +++ roller/trunk/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties Sat Jun 16 06:52:09 2007 @@ -455,6 +455,10 @@ createWeblog.error.missingEmailAddress=You must enter a valid email address createWeblog.error.handleExists=A weblog with that handle already exists +# ----------------------------------------------------------- Auto-installation + +databaseError.title=Database error + # --------------------------------------------------------------- Entry editors @@ -724,7 +728,48 @@ Click the following link and login as user [{2}] to accept or decline this \ invitation <{3}>. -# ------------------------------------------------------------------------ Login +# ------------------------------------------------------------------- Installer + +installer.bannerTitleLeft=Apache Roller Weblogger +installer.bannerTitleRight=Auto-Installer + +installer.cannotConnectToDatabase=Cannot connect to database +installer.whatHappened=What happened? +installer.whatHappenedDatabaseConnectionError=\ +Here's what happened when Roller tried to establish a connection: +installer.whyDidThatHappen=Why did that happen? +installer.aboutTheException=In case the clues above are not enough to help you \ +figure out what is going wrong, here are some more details. The root cause of \ +the problem is an exception of type +installer.heresTheStackTrace=\ +To help you debug the problem, here is the stack trace for that exception: + + +installer.noDatabaseTablesFound=No database tables found +installer.noDatabaseTablesExplanation=\ +Roller is able to connect to your database of type [{0}], but found no tables. +installer.createTables=Would you like Roller to create the tables for you? +installer.yesCreateTables=Yes - create tables now +installer.tablesCreated=Tables created successfully +installer.tablesCreatedExplanation=Database tables were created successfully \ +as you can see below. +installer.pleaseRestart=Before you start using Roller please restart or \ +redeploy the Roller web application. +installer.errorCreatingTables=Error creating tables + +installer.databaseUpgradeNeeded=Database tables need to be upgraded +installer.databaseUpgradeNeededExplanation=\ +Roller is able to connect to your database of type [{0}] and found tables, \ +but the tables need to be upgraded. +installer.upgradeTables=Would you like Roller to upgrade the tables for you? +installer.yesUpgradeTables=Yes - upgrade tables now +installer.tablesUpgraded=Tables were upgraded successfully +installer.tablesUpgradedExplanation=\ +Database tables were upgraded successfully as you can see below. +installer.errorUpgradingTables=Error upgrading tables + + +# ----------------------------------------------------------------------- Login loginPage.title=Welcome to Roller loginPage.prompt=Please enter your username and password to login. @@ -734,7 +779,7 @@ loginPage.login=Login loginPage.reset=Reset -# --------------------------------------------------------------- Bookmark Macro +# -------------------------------------------------------------- Bookmark Macro macro.bookmark.urlFeed=URL of site's RSS feed macro.bookmark.error=The requested Bookmark Folder does not exist: {0} Modified: roller/trunk/apps/weblogger/web/WEB-INF/classes/struts.xml URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/classes/struts.xml?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/classes/struts.xml (original) +++ roller/trunk/apps/weblogger/web/WEB-INF/classes/struts.xml Sat Jun 16 06:52:09 2007 @@ -88,7 +88,7 @@ class="org.apache.roller.weblogger.ui.struts2.core.Setup"> <result name="success" type="tiles">.Setup</result> </action> - + <action name="login" class="org.apache.roller.weblogger.ui.struts2.core.Login"> <result type="tiles">.Login</result> @@ -119,6 +119,27 @@ <result type="tiles">.MainMenu</result> </action> + </package> + + + <!-- Weblogger Admin UI (includes planet) --> + <package name="weblogger-install" namespace="/roller-ui/install" extends="weblogger"> + + <action name="databaseError" + class="org.apache.roller.weblogger.ui.struts2.core.DatabaseError"> + <result name="success" type="tiles">.DatabaseError</result> + </action> + + <action name="createDatabase!*" method="{1}" + class="org.apache.roller.weblogger.ui.struts2.core.CreateDatabase"> + <result name="success" type="tiles">.CreateDatabase</result> + </action> + + <action name="upgradeDatabase!*" method="{1}" + class="org.apache.roller.weblogger.ui.struts2.core.UpgradeDatabase"> + <result name="success" type="tiles">.UpgradeDatabase</result> + </action> + </package> Added: roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/CreateDatabase.jsp URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/CreateDatabase.jsp?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/CreateDatabase.jsp (added) +++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/CreateDatabase.jsp Sat Jun 16 06:52:09 2007 @@ -0,0 +1,60 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<s:if test="error"> + + <h2><s:text name="installer.errorCreatingTables" /></h2> +<pre> +<s:iterator value="messages"> +<s:property/> +</s:iterator> +</pre> + +</s:if> +<s:elseif test="creationRequired"> + + <h2><s:text name="installer.noDatabaseTablesFound" /></h2> + + <p> + <s:text name="installer.noDatabaseTablesExplanation"> + <s:param value="databaseProductName" /> + </s:text> + </p> + <p><s:text name="installer.createTables" /></p> + + <s:form action="createDatabase!create"> + <s:submit key="installer.yesCreateTables" /> + </s:form> + +</s:elseif> +<s:else> + + <h2><s:text name="installer.tablesCreated" /></h2> + + <p><s:text name="installer.tablesCreatedExplanation" /></p> + <p><s:text name="installer.pleaseRestart" /></p> + +<pre> +<s:iterator value="messages"><s:property/><br /></s:iterator> +</pre> + +</s:else> + +<br /> +<br /> Added: roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/DatabaseError.jsp URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/DatabaseError.jsp?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/DatabaseError.jsp (added) +++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/DatabaseError.jsp Sat Jun 16 06:52:09 2007 @@ -0,0 +1,44 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<h2><s:text name="installer.cannotConnectToDatabase" /></h2> + +<h3><s:text name="installer.whatHappened" /></h3> + +<p><s:text name="installer.whatHappenedDatabaseConnectionError" /></p> +<ul> + <s:iterator value="startupLog"> + <li><s:property/></li> + </s:iterator> +</ul> + +<h3><s:text name="installer.whyDidThatHappen" /></h3> + +<p> + <s:text name="installer.aboutTheException" /> + [<s:property value="getRootCauseException().getClass().getName()" />] +</p> + +<p><s:text name="installer.heresTheStackTrace" /></p> +<pre> + [<s:property value="getRootCauseStackTrace()" />] +</pre> + +<br /> +<br /> Added: roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/UpgradeDatabase.jsp URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/UpgradeDatabase.jsp?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/UpgradeDatabase.jsp (added) +++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/core/UpgradeDatabase.jsp Sat Jun 16 06:52:09 2007 @@ -0,0 +1,61 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + + +<s:if test="error"> + + <h2><s:text name="installer.errorUpgradingTables" /></h2> +<pre> +<s:iterator value="messages"> +<s:property/> +</s:iterator> +</pre> + +</s:if> +<s:elseif test="upgradeRequired"> + + <h2><s:text name="installer.databaseUpgradeNeeded" /></h2> + + <p> + <s:text name="installer.databaseUpgradeNeededExplanation"> + <s:param value="databaseProductName" /> + </s:text> + </p> + <p><s:text name="installer.upgradeTables" /></p> + + <s:form action="upgradeDatabase!upgrade"> + <s:submit key="installer.yesUpgradeTables" /> + </s:form> + +</s:elseif> +<s:else> + + <h2><s:text name="installer.tablesUpgraded" /></h2> + + <p><s:text name="installer.tablesUpgradedExplanation" /></p> + <p><s:text name="installer.pleaseRestart" /></p> + +<pre> +<s:iterator value="messages"><s:property/><br /></s:iterator> +</pre> + +</s:else> + +<br /> +<br /> Added: roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/bannerInstallation.jsp URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/bannerInstallation.jsp?view=auto&rev=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/bannerInstallation.jsp (added) +++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/bannerInstallation.jsp Sat Jun 16 06:52:09 2007 @@ -0,0 +1,34 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. The ASF licenses this file to You + under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. For additional information regarding + copyright in this work, please see the NOTICE file in the top level + directory of this distribution. +--%> +<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> + +<div class="bannerStatusBox"> + + <table class="bannerStatusBox" cellpadding="0" cellspacing="0"> + <tr> + <td class="bannerLeft"> + <s:text name="installer.bannerTitleLeft" /> + </td> + + <td class="bannerRight"> + <s:text name="installer.bannerTitleRight" /> + </td> + </tr> + </table> + +</div> Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/tiles-errorpage.jsp URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/tiles-errorpage.jsp?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/tiles-errorpage.jsp (original) +++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/tiles/tiles-errorpage.jsp Sat Jun 16 06:52:09 2007 @@ -25,6 +25,10 @@ </head> <body> + <div id="banner"> + <tiles:insertAttribute name="banner" /> + </div> + <div id="wrapper"> <div id="leftcontent_wrap"> <div id="leftcontent"> Modified: roller/trunk/apps/weblogger/web/WEB-INF/tiles.xml URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/tiles.xml?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/tiles.xml (original) +++ roller/trunk/apps/weblogger/web/WEB-INF/tiles.xml Sat Jun 16 06:52:09 2007 @@ -53,6 +53,7 @@ </definition> <definition name=".tiles-errorpage" template="/WEB-INF/jsps/tiles/tiles-errorpage.jsp"> + <put name="banner" value="/WEB-INF/jsps/tiles/empty.jsp" /> <put name="head" value="/WEB-INF/jsps/tiles/head.jsp" /> <put name="messages" value="/WEB-INF/jsps/tiles/messages.jsp" /> <put name="content" value="${content}" /> @@ -65,12 +66,8 @@ <put name="content" value="/WEB-INF/jsps/errors/denied.jsp" /> </definition> - + <!-- core pages (and associates) --> - <definition name=".Setup" extends=".tiles-simplepage" > - <put name="content" value="/WEB-INF/jsps/core/Setup.jsp" /> - </definition> - <definition name=".Login" extends=".tiles-simplepage" > <put name="content" value="/WEB-INF/jsps/core/Login.jsp" /> </definition> @@ -102,6 +99,30 @@ </definition> + <!-- setup pages --> + <definition name=".Setup" extends=".tiles-simplepage" > + <put name="content" value="/WEB-INF/jsps/core/Setup.jsp" /> + </definition> + + <definition name=".CreateDatabase" extends=".tiles-errorpage" > + <put name="content" value="/WEB-INF/jsps/core/CreateDatabase.jsp" /> + <put name="footer" value="/WEB-INF/jsps/tiles/empty.jsp" /> + <put name="banner" value="/WEB-INF/jsps/tiles/bannerInstallation.jsp" /> + </definition> + + <definition name=".UpgradeDatabase" extends=".tiles-errorpage" > + <put name="content" value="/WEB-INF/jsps/core/UpgradeDatabase.jsp" /> + <put name="footer" value="/WEB-INF/jsps/tiles/empty.jsp" /> + <put name="banner" value="/WEB-INF/jsps/tiles/bannerInstallation.jsp" /> + </definition> + + <definition name=".DatabaseError" extends=".tiles-errorpage" > + <put name="content" value="/WEB-INF/jsps/core/DatabaseError.jsp" /> + <put name="footer" value="/WEB-INF/jsps/tiles/empty.jsp" /> + <put name="banner" value="/WEB-INF/jsps/tiles/bannerInstallation.jsp" /> + </definition> + + <!-- global admin pages (and associates) --> <definition name=".GlobalConfig" extends=".tiles-tabbedpage" > <put name="content" value="/WEB-INF/jsps/admin/GlobalConfig.jsp" /> Modified: roller/trunk/apps/weblogger/web/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/web.xml?view=diff&rev=547924&r1=547923&r2=547924 ============================================================================== --- roller/trunk/apps/weblogger/web/WEB-INF/web.xml (original) +++ roller/trunk/apps/weblogger/web/WEB-INF/web.xml Sat Jun 16 06:52:09 2007 @@ -45,6 +45,11 @@ </filter> <filter> + <filter-name>BootstrapFilter</filter-name> + <filter-class>org.apache.roller.weblogger.ui.core.filters.BootstrapFilter</filter-class> + </filter> + + <filter> <filter-name>CompressionFilter</filter-name> <filter-class>org.apache.roller.weblogger.ui.core.filters.CompressionFilter</filter-class> </filter> @@ -121,6 +126,12 @@ <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> + </filter-mapping> + + <filter-mapping> + <filter-name>BootstrapFilter</filter-name> + <url-pattern>/*</url-pattern> + <dispatcher>REQUEST</dispatcher> </filter-mapping> <!-- Map everything to the PersistenceSessionFilter.
