jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r915541 - in /incubator/jspwiki/trunk/src: WebContent/ WebContent/admin/ WebContent/templates/default/admin/ WebContent/templates/default/admin/tabs/ WebContent/templates/default/layout/ java/org/apache/wiki/action/
Date Tue, 23 Feb 2010 21:59:08 GMT
Author: ajaquith
Date: Tue Feb 23 21:59:07 2010
New Revision: 915541

URL: http://svn.apache.org/viewvc?rev=915541&view=rev
Log:
Moved the admin-related JSPs to the templates directory. Added a new layout JSP, StaticLayout.jsp, that is used with template JSPs that do not need dynamic content, such as Install.jsp. Among other things, this allows admin-related JSPs to look more like ordinary pages, and use the same CSS.

Added:
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Admin.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Install.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/InstallSuccess.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Security.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Users.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/layout/StaticLayout.jsp
Removed:
    incubator/jspwiki/trunk/src/WebContent/admin/Admin.jsp
    incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp
    incubator/jspwiki/trunk/src/WebContent/admin/InstallSuccess.jsp
    incubator/jspwiki/trunk/src/WebContent/admin/SecurityConfig.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/layout/Footer.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/layout/Header.jsp
Modified:
    incubator/jspwiki/trunk/src/WebContent/Error.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/layout/DefaultLayout.jsp
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AdminActionBean.java

Modified: incubator/jspwiki/trunk/src/WebContent/Error.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/Error.jsp?rev=915541&r1=915540&r2=915541&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/Error.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/Error.jsp Tue Feb 23 21:59:07 2010
@@ -18,34 +18,48 @@
     specific language governing permissions and limitations
     under the License.  
 --%>
-<%@ page isErrorPage="true" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<%@ page isErrorPage="true" %>
 <s:useActionBean beanclass="org.apache.wiki.action.MessageActionBean" event="error" id="error" />
-<h3>JSPWiki has detected an error</h3>
-<dl>
-  <dt><b>Error</b></dt>
-  <dd>${error.message}</dd>      
-  <dt><b>Cause</b></dt>
-  <dd>${error.realCause.class.name}</dd>
-  <dt><b>Detailed message</b></dt>
-  <dd>${error.realCause.message}</dd>
-  <dt><b>Place where detected</b></dt>
-  <dd>${error.throwingMethod}</dd>
-</dl>
-<p>
-If you have changed the templates, please do check them.  This error message
-may show up because of that.  If you have not changed them, and you are
-either installing JSPWiki for the first time or have changed configuration,
-then you might want to check your configuration files.  If you are absolutely sure
-that JSPWiki was running quite okay or you can't figure out what is going
-on, then by all means, come over to <a href="http://www.jspwiki.org/">jspwiki.org</a>
-and tell us.  There is more information in the log file (like the full stack trace, 
-which you should add to any error report).
-</p>
-<p>
-And don't worry - it's just a computer program.  Nothing really
-serious is probably going on: at worst you can lose a few nights
-sleep.  It's not like it's the end of the world.
-</p>
+<s:layout-render name="${templates['layout/StaticLayout.jsp']}">
+
+  <s:layout-component name="headTitle">
+    Error
+  </s:layout-component>
+  
+  <s:layout-component name="pageTitle">
+    Error
+  </s:layout-component>
+
+  <s:layout-component name="content">
+    <h3>JSPWiki has detected an error</h3>
+    <dl>
+      <dt><b>Error</b></dt>
+      <dd>${error.message}</dd>      
+      <dt><b>Cause</b></dt>
+      <dd>${error.realCause.class.name}</dd>
+      <dt><b>Detailed message</b></dt>
+      <dd>${error.realCause.message}</dd>
+      <dt><b>Place where detected</b></dt>
+      <dd>${error.throwingMethod}</dd>
+    </dl>
+    <p>
+      If you have changed the templates, please do check them.  This error message
+      may show up because of that.  If you have not changed them, and you are
+      either installing JSPWiki for the first time or have changed configuration,
+      then you might want to check your configuration files.  If you are absolutely sure
+      that JSPWiki was running quite okay or you can't figure out what is going
+      on, then by all means, come over to <a href="http://www.jspwiki.org/">jspwiki.org</a>
+      and tell us.  There is more information in the log file (like the full stack trace, 
+      which you should add to any error report).
+    </p>
+    <p>
+      And don't worry - it's just a computer program.  Nothing really
+      serious is probably going on: at worst you can lose a few nights
+      sleep.  It's not like it's the end of the world.
+    </p>
+    
+    <br clear="all" />
+  </s:layout-component>
 
-<br clear="all" />
+</s:layout-render>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Admin.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Admin.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Admin.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Admin.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,89 @@
+<%-- 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.  
+--%>
+<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<%@ page import="org.apache.wiki.WikiContext" %>
+<%@ page errorPage="/Error.jsp" %>
+<s:layout-render name="${templates['layout/DefaultLayout.jsp']}">
+
+  <s:layout-component name="headTitle">
+    JSPWiki Administration
+  </s:layout-component>
+  
+  <s:layout-component name="pageTitle">
+    JSPWiki Administration
+  </s:layout-component>
+
+  <s:layout-component name="content">
+    <h1>JSPWiki Administration</h1>
+    <div class="information">Not all things can be configured here.  Some things need to be configured
+    in your <tt>jspwiki.properties</tt> file.</div>
+    
+      <wiki:TabbedSection defaultTab="${param['tab']}">
+      
+        <wiki:Tab id="users" title="Users">
+          <jsp:include page="admin/UserManagement.jsp" />
+        </wiki:Tab>
+          
+        <wiki:Tab id="groups" title="Groups">
+          <div>
+            <p>This is a list of all groups in this wiki.  If you click on the group name,
+            you will be taken to the administration page of that particular group.</p>
+            <p><wiki:Plugin plugin="Groups" /></p>
+          </div>
+        </wiki:Tab>
+          
+        <wiki:AdminBeanIterator type="core" id="ab">
+          <wiki:Tab id="${ab.id}" title="${ab.title}">
+            <div class="formcontainer">
+              <s:form beanclass="org.apache.wiki.action.AdminActionBean" method="post" acceptcharset="UTF-8">
+                <s:hidden name="tab-admin" value="core" />
+                <s:hidden name="tab-core" value="${ab.title}" />
+                <s:hidden name="bean" value="${ab.id}" />
+                <%= ab.doGet( (WikiContext)request.getAttribute( "wikiActionBeanContext" ) ) %>
+                <s:submit name="admin" value="Submit" />
+              </s:form>
+            </div>
+          </wiki:Tab>
+        </wiki:AdminBeanIterator>
+          
+        <wiki:AdminBeanIterator type="editors" id="ab">
+          <wiki:Tab id="${ab.id}" title="${ab.title}">
+            <div class="formcontainer"> 
+              <s:form beanclass="org.apache.wiki.action.AdminActionBean" method="post" acceptcharset="UTF-8">
+                <s:hidden name="tab-admin" value="editors" />
+                <s:hidden name="tab-editors" value="${ab.title}" />
+                <s:hidden name="bean" value="${ab.id}" />
+                <%= ab.doGet( (WikiContext)request.getAttribute( "wikiActionBeanContext" ) ) %>
+                <s:submit name="admin" value="Submit" />
+              </s:form>
+            </div>
+          </wiki:Tab>
+        </wiki:AdminBeanIterator>
+    
+        <wiki:Tab id="filters" title="Filters">
+          <p>There will be more filter stuff here</p>
+        </wiki:Tab>
+        
+      </wiki:TabbedSection>
+    </div>
+  </s:layout-component>
+</s:layout-render>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Install.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Install.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Install.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/admin/Install.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,191 @@
+<%-- 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.  
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s"%>
+<%@ page errorPage="/Error.jsp" %>
+<s:layout-render name="${templates['layout/StaticLayout.jsp']}">
+
+  <s:layout-component name="headTitle">
+    <fmt:message key="install.title" />
+  </s:layout-component>
+
+  <s:layout-component name="pageTitle">
+    <fmt:message key="install.title" />
+  </s:layout-component>
+
+  <s:layout-component name="content">
+    <p><fmt:message key="install.intro.p1" /></p>
+    <p><fmt:message key="install.intro.p2" /></p>
+    
+    <!-- Any messages or errors? -->
+    <div class="instructions"><s:messages /></div>
+    <div class="errors"><s:errors globalErrorsOnly="true" /></div>
+    
+    <div class="formcontainer">
+      <s:form beanclass="org.apache.wiki.action.InstallActionBean">
+      
+        <!-- Admin password, application name, base URL and page directory -->
+        <h3><fmt:message key="install.basics" /></h3>
+        <div>
+          <s:label for="adminPassword" />
+          <s:text name="adminPassword" size="20" />
+          <s:errors field="adminPassword" />
+          <div class="description"><fmt:message key="install.adminPassword.description" /></div>
+        </div>
+        
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_applicationName" />
+          <s:text name="properties.jspwiki.jspwiki_applicationName" size="20" />
+          <s:errors field="properties.jspwiki.jspwiki_applicationName" />
+          <div class="description"><fmt:message key="install.applicationName.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_baseURL" />
+          <s:text name="properties.jspwiki.jspwiki_baseURL" size="40" />
+          <s:errors field="properties.jspwiki.jspwiki_baseURL" />
+          <div class="description"><fmt:message key="install.baseURL.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.priha.priha_provider_defaultProvider_directory" />
+          <s:text name="properties.priha.priha_provider_defaultProvider_directory" size="50" />
+          <s:errors field="properties.priha.priha_provider_defaultProvider_directory" />
+          <div class="description"><fmt:message key="install.pageDir.description" /></div>
+        </div>
+        
+        <!-- Advanced settings: security, logging/work directories -->
+        <h3><fmt:message key="install.advanced" /></h3>
+        <div>
+          <s:label for="logDirectory" />
+          <s:text name="logDirectory" size="50" />
+          <s:errors field="logDirectory" />
+          <div class="description"><fmt:message key="install.logDirectory.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_workDir" />
+          <s:text name="properties.jspwiki.jspwiki_workDir" size="40" />
+          <s:errors field="properties.jspwiki.jspwiki_workDir" />
+          <div class="description"><fmt:message key="install.workDir.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" />
+          <s:text name="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" size="40" />
+          <s:errors field="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" />
+          <div class="description"><fmt:message key="install.approver.saveWikiPage.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" />
+          <s:text name="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" size="40" />
+          <s:errors field="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" />
+          <div class="description"><fmt:message key="install.approver.createUserProfile.description" /></div>
+        </div>
+        <div>
+          <s:label for="properties.jspwiki.jspwiki_userdatabase" />
+          <s:select id="userdatabase" name="properties.jspwiki.jspwiki_userdatabase">
+            <s:option value="org.apache.wiki.auth.user.XMLUserDatabase">XML (default)</s:option>
+            <s:option value="org.apache.wiki.auth.user.LdapUserDatabase">LDAP</s:option>
+          </s:select>
+          <s:errors field="properties.jspwiki.jspwiki_userdatabase" />
+          <div class="description"><fmt:message key="install.userdatabase.description" /></div>
+        </div>
+        <div>
+          <s:button id="ldap.showConfig" name="ldap.showConfig"
+            onclick="$('ldapDivConfig').style.display='block'; $('ldap.showConfig').style.display='none';" />
+        </div>
+      
+        <!-- LDAP config -->
+        <div id="ldapDivConfig" style="display:none;">
+          <h3><fmt:message key="install.ldap" /></h3>
+          <p><fmt:message key="install.ldap.description" /></p>
+          <div>
+            <s:label for="properties.jspwiki.ldap_config" />
+            <s:select id="ldap.config" name="properties.jspwiki.ldap_config">
+              <s:options-enumeration enum="org.apache.wiki.auth.LdapConfig.Default" label="name" />
+            </s:select>
+            <s:errors field="properties.jspwiki.ldap_config" />
+            <div class="description"><fmt:message key="ldap.config.description" /></div>
+          </div>
+          <!-- LDAP connection settings and test button -->
+          <div>
+            <s:label for="properties.jspwiki.ldap_connectionURL" />
+            <s:text name="properties.jspwiki.ldap_connectionURL" size="40" />
+            <s:errors field="properties.jspwiki.ldap_connectionURL" />
+            <div class="description"><fmt:message key="ldap.connectionURL.description" /></div>
+          </div>
+          <div>
+            <s:label for="properties.jspwiki.ldap_authentication" />
+            <s:select id="ldap.authentication" name="properties.jspwiki.ldap_authentication">
+              <s:option value="DIGEST-MD5">DIGEST-MD5</s:option>
+              <s:option value="simple">simple</s:option>
+            </s:select>
+            <s:errors field="properties.jspwiki.ldap_authentication" />
+            <div class="description"><fmt:message key="ldap.authentication.description" /></div>
+          </div>
+          <div>
+            <s:label for="properties.jspwiki.ldap_ssl" />
+            <s:checkbox name="properties.jspwiki.ldap_ssl" />
+            <div class="description"><fmt:message key="ldap.ssl.description" /></div>
+          </div>
+          <s:button name="ldapConnection" onclick="Stripes.submitFormEvent(form, 'testLdapConnection', 'ldapConnResults', null);" />
+          <div class="description" id="ldapConnResults"></div>
+          <!-- LDAP authentication settings and test button -->
+          <div>
+            <s:label for="properties.jspwiki.ldap_bindUser" />
+            <s:text name="properties.jspwiki.ldap_bindUser" size="40" />
+            <s:errors field="properties.jspwiki.ldap_bindUser" />
+            <div class="description"><fmt:message key="ldap.bindUser.description" /></div>
+          </div>
+          <div>
+            <s:label for="bindPassword" />
+            <s:text name="bindPassword" size="20" />
+            <s:errors field="bindPassword" />
+            <div class="description"><fmt:message key="ldap.bindPassword.description" /></div>
+          </div>
+          <s:button name="ldapAuthentication" onclick="Stripes.submitFormEvent(form, 'testLdapAuthentication', 'ldapAuthResults', null);" />
+          <div class="description" id="ldapAuthResults"></div>
+          <!-- LDAP user database settings and test button -->
+          <div>
+            <s:label for="properties.jspwiki.ldap_userBase" />
+            <s:text name="properties.jspwiki.ldap_userBase" size="40" />
+            <s:errors field="properties.jspwiki.ldap_userBase" />
+            <div class="description"><fmt:message key="ldap.userBase.description" /></div>
+          </div>
+          <s:button name="ldapUsers" onclick="Stripes.submitFormEvent(form, 'testLdapUsers', 'ldapUserResults', null);" />
+          <div class="description" id="ldapUserResults"></div>
+          <!-- LDAP authorizer settings and test button -->
+          <div>
+            <s:label for="properties.jspwiki.ldap_roleBase" />
+            <s:text name="properties.jspwiki.ldap_roleBase" size="40" />
+            <s:errors field="properties.jspwiki.ldap_roleBase" />
+            <div class="description"><fmt:message key="ldap.roleBase.description" /></div>
+          </div>
+          <s:button name="ldapRoles" onclick="Stripes.submitFormEvent(form, 'testLdapRoles', 'ldapRoleResults', null);" />
+          <div class="description" id="ldapRoleResults"></div>
+        </div>
+        
+        <!-- Save the configuration -->
+        <p><fmt:message key="install.configure.description" /><p>
+        <s:submit name="save" />
+
+      </s:form>
+    </div>
+  </s:layout-component>
+
+</s:layout-render>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/admin/InstallSuccess.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/admin/InstallSuccess.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/admin/InstallSuccess.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/admin/InstallSuccess.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,39 @@
+<%-- 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.  
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s"%>
+<%@ page errorPage="/Error.jsp" %>
+<s:layout-render name="${templates['layout/StaticLayout.jsp']}">
+
+  <s:layout-component name="headTitle">
+    <fmt:message key="install.title" />
+  </s:layout-component>
+
+  <s:layout-component name="pageTitle">
+    <fmt:message key="install.title" />
+  </s:layout-component>
+
+  <s:layout-component name="content">
+    <p><fmt:message key="install.success.description" /></p>
+    <s:link beanclass="org.apache.wiki.action.ViewActionBean"><fmt:message key="install.success.clickhere" /></s:link>
+  </s:layout-component>
+  
+</s:layout-render>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Security.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Security.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Security.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Security.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,230 @@
+<%-- 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.  
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<%@ page import="org.apache.wiki.auth.SecurityVerifier" %>
+<%@ page errorPage="/Error.jsp" %>
+<s:layout-render name="${templates['layout/StaticLayout.jsp']}">
+
+  <s:layout-component name="headTitle">
+    JSPWiki Security Configuration Verifier
+  </s:layout-component>
+
+  <s:layout-component name="pageTitle">
+    JSPWiki Security Configuration Verifier
+  </s:layout-component>
+
+  <s:layout-component name="content">
+    <h1>JSPWiki Security Configuration Verifier</h1>
+    
+    <p>This page examines JSPWiki's security configuration and tries to determine if it is working the way it should. Although JSPWiki comes configured with some reasonable default configuration settings out of the box, it's not always obvious what settings to change if you need to customize the security... and sooner or later, just about everyone does.</p>
+    
+    <p>This page is dynamically generated by JSPWiki. It examines the authentication, authorization and security policy settings. When we think something looks funny, we'll try to communicate what the issue might be, and will make recommendations on how to fix the problem.</p>
+    
+    <p><strong>Please delete this JSP when you are finished troubleshooting your system. 
+    This diagnostic data presented on this page do not represent a security risk
+    to your system <em>per se</em>, but they do provide a significant amount of
+    contextual information that could be useful to an attacker. This page is
+    currently unconstrained, which means that anyone can view it: nice people, mean people
+    and everyone in between. You have been warned.  You can turn it off by setting
+    <pre>
+      jspwiki-x.securityconfig.enable=false
+    </pre>
+    in your jspwiki.properties.
+    </strong></p>
+    
+    <!-- 
+      *********************************************
+      **** A U T H E N T I C A T I O N         ****
+      *********************************************
+    -->
+    <h2>Authentication Configuration</h2>
+    <!-- 
+      *********************************************
+      **** Container Authentication Verifier   ****
+      *********************************************
+    -->
+    <h3>Container-Managed Authentication</h3>
+    <c:choose>
+      <c:when test="${wikiEngine.authenticationManager.containerAuthenticated}">
+        <p>I see that you've configured container-managed authentication. Very nice.</p>
+      </c:when>
+      <c:otherwise>
+        <p>Container-managed authentication appears to be disabled, according to your <code>WEB-INF/web.xml</code> file.</p>
+      </c:otherwise>
+    </c:choose>
+        
+    <!-- 
+      *********************************************
+      **** JAAS Authentication Config Verifier ****
+      *********************************************
+    -->
+    <h3>JAAS Login Configuration</h3>
+    
+    <!-- Notify users which JAAS configs we need to find -->
+    <p>JSPWiki wires up its own JAAS to define the authentication process, and does not rely on the JRE configuration. By default, JSPWiki configures its JAAS login stack to use the UserDatabaseLoginModule. You can specify a custom login module by setting the <code>jspwiki.loginModule.class</code> property in <code>jspwiki.properties</code>.</p>
+    
+    <wiki:Messages div="information" topic='<%=SecurityVerifier.INFO+"java.security.auth.login.config"%>' prefix="Good news: " />
+    <wiki:Messages div="warning" topic='<%=SecurityVerifier.WARNING+"java.security.auth.login.config"%>' prefix="We found some potential problems with your configuration: " />
+    <wiki:Messages div="error" topic='<%=SecurityVerifier.ERROR+"java.security.auth.login.config"%>' prefix="We found some errors with your configuration: " />
+    
+    <!-- Print JAAS configuration status -->
+    <p>The JAAS login configuration is correctly configured if the <code>jspwiki.loginModule.class</code> property specifies
+    a class we can find on the classpath. This class must also be a LoginModule implementation. We will check for both conditions.</p>
+    
+    <wiki:Messages div="information" topic="<%=SecurityVerifier.INFO_JAAS%>" prefix="Good news: " />
+    <wiki:Messages div="warning" topic="<%=SecurityVerifier.WARNING_JAAS%>" prefix="We found some potential problems with your configuration: " />
+    <wiki:Messages div="error" topic="<%=SecurityVerifier.ERROR_JAAS%>" prefix="We found some errors with your configuration: " />
+    
+    <!-- 
+      *********************************************
+      **** A U T H O R I Z A T I O N           ****
+      *********************************************
+    -->
+    <h2>Authorization Configuration</h2>
+    
+    <!-- 
+      *********************************************
+      **** Container Authorization Verifier    ****
+      *********************************************
+    -->
+    <h3>Container-Managed Authorization</h3>
+    <c:choose>
+      <c:when test="${wikiEngine.authenticationManager.containerAuthenticated}">
+        <p>I see that you've configured container-managed authorization. Very nice.</p>
+        <p>Your <code>WEB-INF/web.xml</code> file defines the following roles:</p>
+        <ul>
+          <c:forEach var="role" items="${wikiActionBean.verifier.webContainerRoles}">
+            <li>${role.name}</li>
+          </c:forEach>
+        </ul>
+        <c:if test="${fn:length(wikiActionBean.verifier.webContainerRoles) == 0}">
+          <div class="error">Your <code>WEB-INF/web.xml</code> file does not define any roles. This is an error.</div>
+        </c:if>
+      </c:when>
+      <c:otherwise>
+        <p>Container-managed authorization appears to be disabled, according to your <code>WEB-INF/web.xml</code> file.</p>
+      </c:otherwise>
+    </c:choose>
+    
+    <!-- 
+      *********************************************
+      **** Java Security Policy Verifier       ****
+      *********************************************
+    -->
+    <h3>Security Policy</h3>
+    <p>JSPWiki's authorizes user actions by consulting a standard Java 2 security policy file. By default, JSPWiki installs its local security policy file at startup time. This policy file is independent of your global, JVM-wide security policy, if you have one. When checking for authorization, JSPWiki consults the global policy first, then the local policy.</p>
+    
+    <p>Let's validate the local security policy file. To do this, we parse
+    the security policy and examine each <code>grant</code> block. If we see
+    a <code>permission</code> entry that is signed, we verify that the certificate
+    alias exists in our keystore. The keystore itself must also exist in the file system.
+    And as an additional check, we will try to load each <code>Permission</code> class into memory to verify that JSPWiki's classloader can find them.</p>
+    
+    <wiki:Messages div="information" topic="<%=SecurityVerifier.INFO_POLICY%>" prefix="Good news: " />
+    <wiki:Messages div="warning" topic="<%=SecurityVerifier.WARNING_POLICY%>" prefix="We found some potential problems with your configuration: " />
+    <wiki:Messages div="error" topic="<%=SecurityVerifier.ERROR_POLICY%>" prefix="We found some errors with your configuration: " />
+    
+    <c:if test="${wikiActionBean.verifier.securityPolicyConfigured}">
+      <p>Note: JSPWiki's Policy file parser is stricter than the default parser that ships with the JVM. If you encounter parsing errors, make sure you have the correct comma and semicolon delimiters in your policy file <code>grant</code> entries. The <code>grant</code> blocks must follow this format:</p>
+      <blockquote>
+        <pre>grant signedBy "signer_names", codeBase "URL",
+      principal principal_class_name "principal_name",
+      principal principal_class_name "principal_name",
+      ... {
+      
+      permission permission_class_name "target_name", "action";
+      permission permission_class_name "target_name", "action";
+    };</pre>
+      </blockquote>
+    
+      <p>Note: JSPWiki versions prior to 2.4.6 accidentally omitted commas after the <code>signedBy</code> entries, so you should fix this if you are using a policy file based on a version earlier than 2.4.6.</p>
+    </c:if>
+    
+    <h2>Access Control Validation</h2>
+    
+    <h3>Security Policy Restrictions</h3>
+    
+    <p>Now comes the <em>really</em> fun part. Using the current security policy, we will test the PagePermissions each JSPWiki role possesses for a range of pages. The roles we will test include the standard JSPWiki roles (Authenticated, All, etc.) plus any others you may have listed in the security policy. In addition to the PagePermissions, we will also test the WikiPermissions. The results of these tests should tell you what behaviors you can expect based on your security policy file. If we had problems finding, parsing or verifying the policy file, these tests will likely fail.</p>
+
+    <p>The colors in each cell show the results of the test. <font style="background-color: #c0ffc0;">&nbsp;Green&nbsp;</font> means success; <font style="background-color: #ffc0c0;">&nbsp;red&nbsp;</font> means failure. Hovering over a role name or individual cell will display more detailed information about the role or test.</p>
+
+    ${wikiActionBean.verifier.policyRoleTable}
+
+    <div class="information">Important: these tests do not take into account any page-level access control lists. Page ACLs, if they exist, will contrain access further than what is shown in the table.
+      <c:if test="${wikiEngine.authenticationManager.containerAuthenticated}">
+In addition, because you are using container-managed security, constraints on user activities might be stricter than what is shown in this table. If the container requires that users accessing <code>Edit.jsp</code> possess the container role "Admin," for example, this will override an "edit" PagePermission granted to role "Authenticated." See below.
+      </c:if>
+    </div>
+
+    <c:if test="${wikiEngine.authenticationManager.containerAuthenticated}">
+      <h3>Web Container Restrictions</h3>
+
+      <p>Here is how your web container will control role-based access to some common JSPWiki actions and their assocated JSPs. These restrictions will be enforced even if your Java security policy is more permissive.</p>
+  
+      <p>The colors in each cell show the results of the test. <font style="background-color: #c0ffc0;">&nbsp;Green&nbsp;</font> means success; <font style="background-color: #ffc0c0;">&nbsp;red&nbsp;</font> means failure.</p>
+  
+      <!-- Print table showing role restrictions by JSP -->
+      ${wikiActionBean.verifier.containerRoleTable}
+  
+      <div class="information">Important: these tests do not take into account any page-level access control lists. Page ACLs, if they exist, will contrain access further than what is shown in the table.</div>
+  
+      <!-- Remind the admin their container needs to return the roles -->
+      <p>Note that your web container will allow access to these pages <em>only</em> if your container's authentication realm returns these roles:</p>
+      <ul>
+        <c:forEach var="role" items="${wikiActionBean.verifier.webContainerRoles}">
+          <li>${role.name}</li>
+        </c:forEach>
+      </ul>
+      <p>If your container's realm returns other role names, users won't be able to access the pages they should be allowed to see -- because the role names don't match. In that case, You should adjust the <code>&lt;role-name&gt;</code> entries in <code>web.xml</code> appropriately to match the role names returned by your container's authorization realm.</p>
+      
+      <p>Now we are going to compare the roles listed in your security policy with those from your <code>web.xml</code> file. The ones we care about are those that aren't built-in roles like "All", "Anonymous", "Authenticated" or "Asserted". If your policy shows roles other than these, we need to make sure your container knows about them, too. Container roles are defined in <code>web.xml</code> in blocks such as these:</p>
+      <blockquote><pre>&lt;security-role&gt;
+    &lt;description&gt;
+      This logical role includes all administrative users
+    &lt;/description&gt;
+    &lt;role-name&gt;Admin&lt;/role-name&gt;
+  &lt;/security-role&gt;</pre></blockquote>
+  
+      <wiki:Messages div="information" topic="<%=SecurityVerifier.INFO_ROLES%>" prefix="Good news: " />
+      <wiki:Messages div="error" topic="<%=SecurityVerifier.ERROR_ROLES%>" prefix="We found some errors with your configuration: " />
+    </c:if>
+    
+    <h2>User and Group Databases</h2>
+    
+    <h3>User Database Configuration</h3>
+    <p>The user database stores user profiles. It's pretty important that it functions properly. We will try to determine what your current UserDatabase implementation is, based on the current value of the <code>jspwiki.userdatabase</code> property in your <code>jspwiki.properties</code> file. In addition, once we establish that the UserDatabase has been initialized properly, we will try to add (then, delete) a random test user. If all of these things work they way they should, then you should have no problems with user self-registration.</p>
+    
+    <wiki:Messages div="information" topic="<%=SecurityVerifier.INFO_DB%>" prefix="Good news: " />
+    <wiki:Messages div="warning" topic="<%=SecurityVerifier.WARNING_DB%>" prefix="We found some potential problems with your configuration: " />
+    <wiki:Messages div="error" topic="<%=SecurityVerifier.ERROR_DB%>" prefix="We found some errors with your configuration: " />
+    
+    <h3>Group Database Configuration</h3>
+    <p>The group database stores wiki groups. It's pretty important that it functions properly. We will try to determine what your current GroupDatabase implementation is, based on the current value of the <code>jspwiki.groupdatabase</code> property in your <code>jspwiki.properties</code> file. In addition, once we establish that the GroupDatabase has been initialized properly, we will try to add (then, delete) a random test group. If all of these things work they way they should, then you should have no problems with wiki group creation and editing.</p>
+    
+    <wiki:Messages div="information" topic="<%=SecurityVerifier.INFO_GROUPS%>" prefix="Good news: " />
+    <wiki:Messages div="warning" topic="<%=SecurityVerifier.WARNING_GROUPS%>" prefix="We found some potential problems with your configuration: " />
+    <wiki:Messages div="error" topic="<%=SecurityVerifier.ERROR_GROUPS%>" prefix="We found some errors with your configuration: " />
+  </s:layout-component>
+  
+</s:layout-render>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Users.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Users.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Users.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/admin/tabs/Users.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,143 @@
+<%-- 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.  
+--%>
+<%@ page import="java.util.*" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.rpc.json.*" %>
+<%@ page import="org.apache.wiki.ui.admin.*" %>
+<%@ page errorPage="/Error.jsp" %>
+<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<script>
+function constructdate(date)
+{
+  var d = new Date();
+  d.setTime(date.time);
+  return d;
+}
+
+function refreshUserInfo()
+{
+   var userid = $('userid').getValue();
+
+   if( userid == '--New--' ) return;
+
+   Wiki.jsonrpc("users.getUserInfo", [userid], function(userprofile){
+      $('loginname').value = userprofile.loginName;
+      $('loginid').value = userprofile.loginName;
+      $('fullname').value = userprofile.fullname;
+      $('email').value = userprofile.email;
+      $('lastmodified').setHTML(constructdate(userprofile.lastModified));
+      $('creationdate').setHTML(constructdate(userprofile.created));
+   });
+}
+
+function addNew()
+{
+  $('loginid').value = "--New--";
+  $('loginname').value = "--New--";
+  $('fullname').value = "Undefined";
+  $('email').value = "";
+  $('lastmodified').innerHTML = "";
+  $('creationdate').innerHTML = "";
+ 
+  var idlist=$('userid');
+  var len = idlist.options.length;
+  idlist.options[len] = new Option('--New--','--New--');
+  idlist.selectedIndex = len;
+}
+</script>
+<div>
+   <p>
+   This is a list of user accounts that exist in this system.
+   </p>
+   <p><wiki:Messages/></p>
+   <div id="userlist">
+      <select name="userid" id="userid" size="16" onchange="javascript:refreshUserInfo()">
+         <c:forEach var="user" items="${engine.userManager.userDatabase.wikiNames}">
+           <option value="${user.name}"><c:out value="${user.name}" escapeXml="true"/></option>
+         </c:forEach>
+      </select>
+   </div>
+   <div id="useredit">
+   <form action="<wiki:Link jsp='admin/Admin.jsp' format='url'><wiki:Param name='tab-admin' value='users'/></wiki:Link>" 
+       class="wikiform"
+          id="adminuserform" 
+    onsubmit="return Wiki.submitOnce(this);"
+      method="post" accept-charset="<wiki:ContentEncoding/>"
+     enctype="application/x-www-form-urlencoded" >
+     <input type="hidden" name='bean' value='org.apache.wiki.ui.admin.beans.UserBean'/>
+     <input type="hidden" id="loginid" name="loginid" value="" />
+     <table>
+     <tr>
+       <td><label for="loginname">Login name</label></td>
+       <td>
+           <input type="text" name="loginname" id="loginname" size="20" value="" />
+       </td>
+     </tr>
+     <tr>
+       <td><label for="password">Password </label></td>
+       <td>
+          <input type="password" name="password" id="password" size="20" value="" />
+       </td>
+     </tr>
+     <tr>
+       <td><label for="password2">Confirm password</label></td>
+       <td>
+         <input type="password" name="password2" id="password2" size="20" value="" />
+       </td>
+     </tr>
+     <tr>
+       <td><label for="fullname">Full name</label></td>
+       <td>
+         <input type="text" name="fullname" id="fullname" size="20" value="" />
+       </td>
+     </tr>
+     <tr>
+       <td><label for="email">Email</label></td>
+       <td>
+         <input type="text" name="email" id="email" size="20" value="" />
+       </td>
+     </tr>
+
+     <tr class="additinfo">
+       <td><label>Creation date</label></td>
+       <td class="formvalue" id="creationdate">
+       </td>
+     </tr>
+     <tr class="additinfo">
+       <td><label>Last modified</label></td>
+       <td class="formvalue" id="lastmodified">
+       </td>
+     </tr>
+
+     <tr>
+        <td><input type="submit" name="action" value="Save" /></td>
+     </tr>
+
+     </table>
+   <div id="useractions">
+     <input type="submit" name="action" value="Remove" onclick="return( confirm('Are you sure you wish to remove this user?') && Wiki.submitOnce(this) );" />      <input type="button" value="Add" onclick="javascript:addNew()" />
+   </div>
+   </form>
+   </div>
+</div>
\ No newline at end of file

Modified: incubator/jspwiki/trunk/src/WebContent/templates/default/layout/DefaultLayout.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/layout/DefaultLayout.jsp?rev=915541&r1=915540&r2=915541&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/layout/DefaultLayout.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/layout/DefaultLayout.jsp Tue Feb 23 21:59:07 2010
@@ -1,3 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <%--
     JSPWiki - a JSP-based WikiWiki clone.
 
@@ -22,6 +24,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<%@ page import="org.apache.wiki.Release" %>
 <%@ page import="org.apache.wiki.WikiContext" %>
 <%@ page import="org.apache.wiki.action.WikiContextFactory" %>
 <%--
@@ -42,6 +45,8 @@
                                 functions. Default=blank
           jsfunction          : JavaScript functions. Default=blank
           headMetaRobots      : Search engine options. Default=noindex,nofollow
+          pageTitle           : The title for the JSP, which will be rendered
+                                at the top of the page body. Default=wiki: pagename
           content             : The page contents. Default=blank
 
      2) DefaultLayout injects additional JSPs that are meant to be
@@ -52,32 +57,26 @@
 
 --%>
 <s:layout-definition>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>
-    <%--
-
-         Title: by default, use the "view page" title
-    --%>
-    <s:layout-component name="headTitle">
-      <fmt:message key="view.title.view">
-        <fmt:param><wiki:Variable var="ApplicationName" /></fmt:param>
-        <fmt:param><wiki:PageName/></fmt:param>
-      </fmt:message>
-    </s:layout-component>
+      <%--
+  
+           Title: by default, use the "view page" title
+      --%>
+      <s:layout-component name="headTitle">
+        <fmt:message key="view.title.view">
+          <fmt:param><wiki:Variable var="ApplicationName" /></fmt:param>
+          <fmt:param><wiki:PageName/></fmt:param>
+        </fmt:message>
+      </s:layout-component>
     </title>
     <%--
 
          CSS stylesheets
     --%>
-    <link rel="stylesheet" media="screen, projection, print" type="text/css" href="<wiki:Link format='url' templatefile='jspwiki.css' />" />
-    <%-- put this at the top, to avoid double load when not yet cached --%>
-    <%-- FIXME : @media print is included in jspwiki.css
-    <link rel="stylesheet" type="text/css" media="print" href="<wiki:Link format='url' templatefile='jspwiki_print.css' />" />
-    --%>
-    <link rel="alternate stylesheet" type="text/css" href="<wiki:Link format='url' templatefile='jspwiki_print.css' />" title="Print friendly" />
-    <link rel="alternate stylesheet" type="text/css" href="<wiki:Link format='url' templatefile='jspwiki.css' />" title="Standard" />
+    <s:url value="${templates['jspwiki.css']}" var="css" />
+    <link rel="stylesheet" media="screen, projection, print" type="text/css" href="${css}" />
+    <link rel="alternate stylesheet" type="text/css" href="${css}" title="Standard" />
     <s:layout-component name="stylesheet" />
     <s:layout-component name="inlinecss" />
     <%--
@@ -87,9 +86,8 @@
     <link rel="search" href="<wiki:LinkTo format='url' page='FindPage' />" title='Search ${wikiEngine.applicationName}' />
     <link rel="help" href="<wiki:LinkTo format='url' page='TextFormattingRules' />" title="Help" />
     <link rel="start" href="<wiki:LinkTo format='url' page='${wikiEngine.frontPage}' />" title="Front page" />
-    <link rel="shortcut icon" type="image/x-icon" href="<wiki:Link format='url' jsp='images/favicon.ico' />" />
-    <%-- ie6 needs next line --%>
-    <link rel="icon" type="image/x-icon" href="<wiki:Link format='url' jsp='favicon.ico' />" />
+    <s:url value="${templates['images/favicon.ico']}" var="favicon" />
+    <link rel="shortcut icon" type="image/x-icon" href="${favicon}" />
     <%--
 
          Support for the universal edit button
@@ -153,25 +151,54 @@
          Search engines: by default, page is not indexed or followed
     --%>
     <s:layout-component name="headMetaRobots">
-    <meta name="robots" content="noindex,nofollow" />
+      <meta name="robots" content="noindex,nofollow" />
     </s:layout-component>
     <%--
 
          RSS Feed discovery
     --%>
     <wiki:FeedDiscovery/>
-
-    <jsp:include page="${templates['layout/LocalHeader.jsp']}" />
-
-
   </head>
 
+  <%--
+       Body content
+  --%>
   <body class="${wikiContext.requestContext}">
 
     <div id="wikibody" class="${prefs.Orientation}">
 
-      <jsp:include page="${templates['layout/Header.jsp']}" />
+      <%--
+            Local header
+      --%>
+      <div id="localHeader">
+        <jsp:include page="${templates['layout/LocalHeader.jsp']}" />
+      </div>
+    
+      <%--
+            Header
+      --%>
+      <div id="header">
+        <div class="titlebox"><wiki:InsertPage page="TitleBox" /></div>
+        <div class="applicationlogo" >
+          <c:set var="frontPageTitle"><fmt:message key='actions.home.title' ><fmt:param><c:out value='${wikiEngine.frontPage}' /></fmt:param></fmt:message></c:set>
+          <s:link beanclass="org.apache.wiki.action.ViewActionBean" title="${frontPageTitle}"><fmt:message key="actions.home" /></s:link>
+        </div>
+        <div class="companylogo"></div>
+        <div class="pagename">
+          <s:layout-component name="pageTitle">
+            <wiki:PageName/>
+          </s:layout-component>
+        </div>
+        <jsp:include page="${templates['layout/UserBox.jsp']}" />
+        <div class="searchbox">
+          <jsp:include page="${templates['layout/SearchBox.jsp']}" />
+        </div>
+        <div class="breadcrumbs"><fmt:message key="header.yourtrail" /><wiki:Breadcrumbs/></div>
+      </div>
 
+      <%--
+            Page content
+      --%>
       <div id="content">
         <div id="page">
           <jsp:include page="${templates['layout/PageActionsTop.jsp']}" />
@@ -182,7 +209,23 @@
       	<div class="clearbox"></div>
       </div>
 
-      <jsp:include page="${templates['layout/Footer.jsp']}" />
+      <%--
+            Footer
+      --%>
+      <div id="footer">
+        <div class="applicationlogo" >
+          <c:set var="frontPageTitle"><fmt:message key='actions.home.title' ><fmt:param><c:out value='${wikiEngine.frontPage}' /></fmt:param></fmt:message></c:set>
+          <s:link beanclass="org.apache.wiki.action.ViewActionBean" title="${frontPageTitle}"><fmt:message key="actions.home" /></s:link>
+        </div>
+        <div class="companylogo"></div>
+        <div class="copyright"><wiki:InsertPage page="CopyrightNotice" /></div>
+        <div class="wikiversion">
+          <%=Release.APPNAME%> v<%=Release.getVersionString()%>
+        </div>
+        <div class="rssfeed">
+          <wiki:RSSImageLink title="Aggregate the RSS feed" />
+        </div>
+      </div>
 
     </div>
   </body>

Added: incubator/jspwiki/trunk/src/WebContent/templates/default/layout/StaticLayout.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/layout/StaticLayout.jsp?rev=915541&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/layout/StaticLayout.jsp (added)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/layout/StaticLayout.jsp Tue Feb 23 21:59:07 2010
@@ -0,0 +1,114 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<%--
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  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.
+--%>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
+<%@ page import="org.apache.wiki.Release" %>
+<%--
+     Minimal layout used for JSPs that don't need any dynamic content.
+     Its structure is identical to DefaultLayout.jsp.
+     Its only customizable components are 'headTitle,' 'pageTitle,' and 'content'.
+--%>
+<s:layout-definition>
+  <head>
+    <title>
+      <%--
+  
+           Title: by default, it just says "JSPWiki"
+      --%>
+      <s:layout-component name="headTitle">
+        JSPWiki
+      </s:layout-component>
+    </title>
+    <%--
+
+         CSS, JavaScript and meta tags
+    --%>
+    <s:url value="${templates['jspwiki.css']}" var="css" />
+    <link rel="stylesheet" media="screen, projection, print" type="text/css" href="${css}" />
+    <link rel="alternate stylesheet" type="text/css" href="${css}" title="Standard" />
+    <s:url value="${templates['images/favicon.ico']}" var="favicon" />
+    <link rel="shortcut icon" type="image/x-icon" href="${favicon}" />
+    <script type="text/javascript" src="<s:url value='/scripts/mootools-core.js' />"></script>
+    <script type="text/javascript" src="<s:url value='/scripts/mootools-more.js' />"></script>
+    <script type="text/javascript" src="<s:url value='/scripts/jspwiki-common.js' />"></script>
+    <script type="text/javascript" src="<s:url value='/scripts/jspwiki-commonstyles.js' />"></script>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <meta name="robots" content="noindex,nofollow" />
+  </head>
+
+  <body class="static">
+    <div id="wikibody" class="LEFT">
+    
+      <%--
+            Local header
+      --%>
+      <div id="localHeader">
+        <jsp:include page="${templates['layout/LocalHeader.jsp']}" />
+      </div>
+    
+      <%--
+            Header
+      --%>
+      <div id="header">
+        <div class="titlebox"></div>
+        <div class="applicationlogo" >
+          <s:link href="/"><fmt:message key="actions.home" /></s:link>
+        </div>
+        <div class="companylogo"></div>
+        <div class="pagename">
+          <s:layout-component name="pageTitle">
+            JSPWiki
+          </s:layout-component>
+        </div>
+        <div class="searchbox"></div>
+        <div class="breadcrumbs"></div>
+      </div>
+
+      <%--
+            Page content
+      --%>
+      <div id="content">
+        <div id="page">
+          <s:layout-component name="content" />
+        </div>
+      	<div class="clearbox"></div>
+      </div>
+      
+      <%--
+            Footer
+      --%>
+      <div id="footer">
+        <div class="applicationlogo" >
+          <s:link href="/"><fmt:message key="actions.home" /></s:link>
+        </div>
+        <div class="companylogo"></div>
+        <div class="copyright"></div>
+        <div class="wikiversion">
+          <%=Release.APPNAME%> v<%=Release.getVersionString()%>
+        </div>
+      </div>
+
+    </div>
+  </body>
+
+</html>
+</s:layout-definition>

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AdminActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AdminActionBean.java?rev=915541&r1=915540&r2=915541&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AdminActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AdminActionBean.java Tue Feb 23 21:59:07 2010
@@ -9,15 +9,15 @@
 
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.auth.SecurityVerifier;
-import org.apache.wiki.auth.permissions.AllPermission;
 import org.apache.wiki.ui.admin.AdminBean;
-import org.apache.wiki.ui.stripes.HandlerPermission;
+import org.apache.wiki.ui.stripes.TemplateResolution;
 import org.apache.wiki.util.TextUtil;
 
 /**
  * Administrative actions, including {@link AdminBean} execution and security
  * configuration.
  */
+@UrlBinding( "/admin/Admin.jsp" )
 public class AdminActionBean extends AbstractActionBean
 {
     private AdminBean m_bean = null;
@@ -46,7 +46,7 @@
             };
         }
         m_securityVerifier = new SecurityVerifier( engine, getContext().getWikiSession() );
-        return new ForwardResolution( "/admin/SecurityConfig.jsp" );
+        return new TemplateResolution( "admin/Security.jsp" ).addParameter( "tab", "security" );
     }
 
     /**
@@ -136,6 +136,6 @@
             };
         }
         m_bean.doPost( getContext() );
-        return new ForwardResolution( "/admin/Admin.jsp" );
+        return new TemplateResolution( "admin/Admin.jsp" ).addParameter( "tab", "admin" );
     }
 }



Mime
View raw message