jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r724275 - in /incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH: ./ src/com/ecyrd/jspwiki/ src/com/ecyrd/jspwiki/action/ src/com/ecyrd/jspwiki/tags/ src/com/ecyrd/jspwiki/ui/migrator/ src/com/ecyrd/jspwiki/ui/stripes/ src/webdocs/ src/webdocs/a...
Date Mon, 08 Dec 2008 07:45:48 GMT
Author: jalkanen
Date: Sun Dec  7 23:45:46 2008
New Revision: 724275

URL: http://svn.apache.org/viewvc?rev=724275&view=rev
Log:
Merged with trunk r724263

Added:
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java
      - copied unchanged from r724270, incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java
Modified:
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AttachActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/CommentActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/DeleteActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/EditActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ErrorActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/NoneActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/PageInfoActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorInfo.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JSPWikiJspTransformer.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JspDocument.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/GroupTypeConverter.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerInfo.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Captcha.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Comment.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Error.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Message.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/PageModified.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Rename.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Wiki.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/Admin.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/SecurityConfig.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXPreview.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/EditGroupContent.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/GroupContent.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/NewGroupContent.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/preview.jsp
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java
    incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog Sun Dec  7 23:45:46 2008
@@ -1,3 +1,19 @@
+2008-12-06  Andrew Jaquith <ajaquith AT apache DOT org>
+
+        * 3.0.0-svn-27
+
+        * Improvements to JSPs and special page handling. JSPs are still
+        not quite working yet, but the webapp does run, and without too
+        many errors.
+
+2008-12-06  Andrew Jaquith <ajaquith AT apache DOT org>
+
+        * 3.0.0-svn-26
+
+        * Small tweaks to JspMigrator to look for, and fix, JSP page import directives
+        for TextUtil, FileUtil and SearchResult (these have moved). Fixed JspMigrator
+        Ant task ("migrate") so that it runs. Minor JSP tweaks so they compile again.
+
 2008-12-05  Andrew Jaquith <ajaquith AT apache DOT org>
 
         * 3.0.0-svn-25
@@ -71,7 +87,7 @@
         * 3.0.0-svn-18
 
         * Checked in the Stripes code (about 220 classes, tests, JSPs
-        and other files. All code compiles clean, but the JSPs do NOT
+        and other files). All code compiles clean, but the JSPs do NOT
         work at the moment. Unit tests run clean except for some
         stray failing Stripes-related unit tests. See the file
         doc/README - Stripes Migration for some (repeat, SOME) details

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml Sun Dec  7 23:45:46 2008
@@ -300,7 +300,7 @@
       <arg line="${srcfiles}"/>
     </exec>
     <!-- Migrate the JSPs -->
-    <java classname="com.ecyrd.jspwiki.ui.stripes.JspMigrator" fork="yes" maxmemory="512m">
+    <java classname="com.ecyrd.jspwiki.ui.migrator.JspMigrator" fork="yes" maxmemory="512m">
       <classpath>
          <path refid="path.tests" />
       </classpath>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java Sun Dec  7 23:45:46 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "24";
+    public static final String     BUILD         = "27";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java Sun Dec  7 23:45:46 2008
@@ -34,6 +34,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import net.sourceforge.stripes.action.RedirectResolution;
+
 import org.apache.commons.lang.time.StopWatch;
 import org.apache.jspwiki.api.FilterException;
 import org.apache.jspwiki.api.WikiException;
@@ -1059,7 +1061,7 @@
      *  <p>If the page is a special page, then returns a direct URL
      *  to that page.  Otherwise returns <code>null</code>.
      *  This method delegates requests to
-     *  {@link com.ecyrd.jspwiki.action.WikiContextFactory#getSpecialPageReference(String)}.
+     *  {@link com.ecyrd.jspwiki.action.WikiContextFactory#getSpecialPageResolution(String)}.
      *  </p>
      *  <p>
      *  Special pages are defined in jspwiki.properties using the jspwiki.specialPage
@@ -1072,7 +1074,8 @@
      */
     public String getSpecialPageReference( String original )
     {
-        return m_contextFactory.getSpecialPageReference( original );
+        RedirectResolution resolution = m_contextFactory.getSpecialPageResolution( original );
+        return resolution == null ? null : resolution.getUrl( Locale.getDefault() );
     }
 
     /**
@@ -1158,7 +1161,7 @@
 
         try
         {
-            if( m_contextFactory.getSpecialPageReference(page) != null ) return true;
+            if( m_contextFactory.getSpecialPageResolution(page) != null ) return true;
 
             if( getFinalPageName( page ) != null )
             {
@@ -1187,7 +1190,7 @@
     public boolean pageExists( String page, int version )
         throws ProviderException
     {
-        if( m_contextFactory.getSpecialPageReference(page) != null ) return true;
+        if( m_contextFactory.getSpecialPageResolution(page) != null ) return true;
 
         String finalName = getFinalPageName( page );
 

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AttachActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AttachActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AttachActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AttachActionBean.java Sun Dec  7 23:45:46 2008
@@ -11,7 +11,7 @@
 import com.ecyrd.jspwiki.ui.stripes.WikiRequestContext;
 
 @UrlBinding("/attach/{page}/{attachment}")
-public class AttachActionBean extends AbstractActionBean
+public class AttachActionBean extends AbstractPageActionBean
 {
     private Attachment m_attachment;
     

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/CommentActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/CommentActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/CommentActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/CommentActionBean.java Sun Dec  7 23:45:46 2008
@@ -9,7 +9,7 @@
 import com.ecyrd.jspwiki.ui.stripes.WikiRequestContext;
 
 @UrlBinding("/Comment.jsp")
-public class CommentActionBean extends AbstractActionBean
+public class CommentActionBean extends AbstractPageActionBean
 {
     @HandlesEvent("comment")
     @HandlerPermission(permissionClass=PagePermission.class, target="${page.name}", actions=PagePermission.COMMENT_ACTION)

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/DeleteActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/DeleteActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/DeleteActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/DeleteActionBean.java Sun Dec  7 23:45:46 2008
@@ -9,7 +9,7 @@
 import com.ecyrd.jspwiki.ui.stripes.WikiRequestContext;
 
 @UrlBinding("/Delete.jsp")
-public class DeleteActionBean extends AbstractActionBean
+public class DeleteActionBean extends AbstractPageActionBean
 {
     @HandlesEvent("delete")
     @HandlerPermission(permissionClass=PagePermission.class, target="${page.name}", actions=PagePermission.DELETE_ACTION)

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/EditActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/EditActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/EditActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/EditActionBean.java Sun Dec  7 23:45:46 2008
@@ -7,7 +7,7 @@
 import com.ecyrd.jspwiki.ui.stripes.WikiRequestContext;
 
 @UrlBinding("/Edit.jsp")
-public class EditActionBean extends AbstractActionBean
+public class EditActionBean extends AbstractPageActionBean
 {
     @DefaultHandler
     @HandlesEvent("edit")

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ErrorActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ErrorActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ErrorActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ErrorActionBean.java Sun Dec  7 23:45:46 2008
@@ -5,7 +5,7 @@
 import net.sourceforge.stripes.action.*;
 
 @UrlBinding("/Error.jsp")
-public class ErrorActionBean extends AbstractActionBean
+public class ErrorActionBean extends AbstractPageActionBean
 {
     /**
      * Default event that forwards control to /Message.jsp.

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/NoneActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/NoneActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/NoneActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/NoneActionBean.java Sun Dec  7 23:45:46 2008
@@ -14,7 +14,7 @@
  * 
  * @author Andrew Jaquith
  */
-public class NoneActionBean extends AbstractActionBean
+public class NoneActionBean extends AbstractPageActionBean
 {
     @DefaultHandler
     @HandlesEvent( "none" )

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/PageInfoActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/PageInfoActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/PageInfoActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/PageInfoActionBean.java Sun Dec  7 23:45:46 2008
@@ -10,7 +10,7 @@
 import com.ecyrd.jspwiki.ui.stripes.WikiRequestContext;
 
 @UrlBinding("/PageInfo.jsp")
-public class PageInfoActionBean extends AbstractActionBean
+public class PageInfoActionBean extends AbstractPageActionBean
 {
     @DefaultHandler
     @HandlesEvent("info")

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java Sun Dec  7 23:45:46 2008
@@ -52,7 +52,7 @@
  * @author Andrew Jaquith
  */
 @UrlBinding( "/Rename.action" )
-public class RenameActionBean extends AbstractActionBean
+public class RenameActionBean extends AbstractPageActionBean
 {
     private static final Logger log = LoggerFactory.getLogger( RenameActionBean.class );
 

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java Sun Dec  7 23:45:46 2008
@@ -1,13 +1,12 @@
 package com.ecyrd.jspwiki.action;
 
-import org.apache.jspwiki.api.WikiException;
-
 import net.sourceforge.stripes.action.*;
 import net.sourceforge.stripes.controller.LifecycleStage;
-import net.sourceforge.stripes.validation.Validate;
 import net.sourceforge.stripes.validation.ValidationError;
 import net.sourceforge.stripes.validation.ValidationErrors;
 
+import org.apache.jspwiki.api.WikiException;
+
 import com.ecyrd.jspwiki.WikiEngine;
 import com.ecyrd.jspwiki.WikiPage;
 import com.ecyrd.jspwiki.auth.permissions.PagePermission;
@@ -23,11 +22,9 @@
  *
  */
 @UrlBinding("/Wiki.action")
-public class ViewActionBean extends AbstractActionBean
+public class ViewActionBean extends AbstractPageActionBean
 {
     private Logger log = LoggerFactory.getLogger(ViewActionBean.class);
-    
-    private WikiPage m_page = null;
 
     public ViewActionBean()
     {
@@ -35,15 +32,6 @@
     }
 
     /**
-     * Returns the WikiPage; defaults to <code>null</code>.
-     * @return the page
-     */
-    public WikiPage getPage()
-    {
-        return m_page;
-    }
-
-    /**
      * <p>After the binding and validation  {@link LifecycleStage#BindingAndValidation}
      * lifecycle stage executes, this method determines whether the
      * page name specified in the request is actually a special page and
@@ -54,7 +42,7 @@
      * for one, or a "special page" reference. This method considers
      * special page names from <code>jspwiki.properties</code>, and possible aliases.
      * To determine whether the page is a special page, this method calls
-     *  {@link com.ecyrd.jspwiki.action.WikiContextFactory#getSpecialPageReference(String)}.
+     *  {@link com.ecyrd.jspwiki.action.WikiContextFactory#getSpecialPageResolution(String)}.
      *  @return a {@link net.sourceforge.stripes.action.RedirectResolution} to the special
      *  page's real URL, if a special page was specified, or <code>null</code> otherwise
      */
@@ -65,17 +53,26 @@
         ValidationErrors errors = this.getContext().getValidationErrors();
         WikiEngine engine = getContext().getEngine();
         
-        // If user supplied a page that doesn't exist, redirect to the "create pages" ActionBean
+        // The user supplied a page that doesn't exist
         if ( errors.get("page" )!= null )
         {
             for (ValidationError pageParamError : errors.get("page"))
             {
                 if ( "page".equals(pageParamError.getFieldName()) )
                 {
-                    String newPage = pageParamError.getFieldValue();
-                    log.info("User supplied page name '" + newPage + "' that doesn't exist; redirecting to create pages JSP." );
-                    RedirectResolution resolution = new RedirectResolution(NewPageActionBean.class);
-                    resolution.addParameter("page", newPage);
+                    String pageName = pageParamError.getFieldValue();
+                    
+                    // Is it a special page?
+                    RedirectResolution resolution = getContext().getEngine().getWikiContextFactory().getSpecialPageResolution( pageName );
+                    if ( resolution != null )
+                    {
+                        return resolution;
+                    }
+
+                    // Ok, it really doesn't exist. Send 'em to the "Create new page?" JSP
+                    log.info("User supplied page name '" + pageName + "' that doesn't exist; redirecting to create pages JSP." );
+                    resolution = new RedirectResolution(NewPageActionBean.class);
+                    resolution.addParameter("page", pageName);
                     return resolution;
                 }
             }
@@ -92,6 +89,10 @@
             {
                 // Bind the front page to the action bean
                 page = engine.getPage( engine.getFrontPage() );
+                if ( page == null )
+                {
+                    page = new WikiPage( engine, engine.getFrontPage() );
+                }
                 setPage(page);
                 return null;
             }
@@ -103,16 +104,8 @@
             throw new WikiException("Page not supplied, and WikiEngine does not define a front page! This is highly unusual.") ;
         }
         
-        // Ok, the user supplied a page. That's nice. But is it a special page?
-        String pageName = page.getName();
-        String specialUrl = getContext().getEngine().getWikiContextFactory().getSpecialPageReference( pageName );
-        if ( specialUrl != null )
-        {
-            return new RedirectResolution( getContext().getViewURL( specialUrl ) );
-        }
-
         // Is there an ALIAS attribute in the wiki pge?
-        specialUrl = (String)page.getAttribute( WikiPage.ALIAS );
+        String specialUrl = (String)page.getAttribute( WikiPage.ALIAS );
         if( specialUrl != null )
         {
             return new RedirectResolution( getContext().getViewURL( specialUrl ) );
@@ -130,17 +123,6 @@
     }
 
     /**
-     * Sets the page.
-     * @param page the wiki page.
-     */
-    @Validate( required = false)
-    public void setPage( WikiPage page )
-    {
-        m_page = page;
-        getContext().setPage( page );
-    }
-    
-    /**
      * Default handler that simply forwards the user back to the same page. 
      * Every ActionBean needs a default handler to function properly, so we use
      * this (very simple) one.

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java Sun Dec  7 23:45:46 2008
@@ -1,20 +1,22 @@
 package com.ecyrd.jspwiki.action;
 
 import java.lang.reflect.Method;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.PageContext;
 
-import org.apache.jspwiki.api.WikiException;
-
 import net.sourceforge.stripes.action.RedirectResolution;
 import net.sourceforge.stripes.mock.MockHttpServletRequest;
 import net.sourceforge.stripes.mock.MockHttpServletResponse;
 import net.sourceforge.stripes.mock.MockHttpSession;
 import net.sourceforge.stripes.util.ResolverUtil;
 
+import org.apache.jspwiki.api.WikiException;
+
 import com.ecyrd.jspwiki.*;
 import com.ecyrd.jspwiki.auth.SessionMonitor;
 import com.ecyrd.jspwiki.log.Logger;
@@ -278,27 +280,21 @@
 
     /**
      * <p>
-     * If the page is a special page, this method returns a direct URL to that
-     * page; otherwise, it returns <code>null</code>.
+     * If the page is a special page, this method returns a
+     * {@link net.sourceforge.stripes.action.RedirectResolution} for that page;
+     * otherwise, it returns <code>null</code>.
      * </p>
      * <p>
-     * Special pages are non-existant references to other pages. For example,
+     * Special pages are non-existent references to other pages. For example,
      * you could define a special page reference "RecentChanges" which would
      * always be redirected to "RecentChanges.jsp" instead of trying to find a
      * Wiki page called "RecentChanges".
      * </p>
      * TODO: fix this algorithm
      */
-    public final String getSpecialPageReference( String page )
+    public final RedirectResolution getSpecialPageResolution( String page )
     {
-        RedirectResolution resolution = m_specialRedirects.get( page );
-
-        if( resolution != null )
-        {
-            return resolution.getUrl( Locale.getDefault() );
-        }
-
-        return null;
+        return m_specialRedirects.get( page );
     }
 
     /**
@@ -450,7 +446,28 @@
                 if( specialPage != null && redirectUrl != null )
                 {
                     specialPage = specialPage.trim();
+                    
+                    // Parse the special page
                     redirectUrl = redirectUrl.trim();
+                    try
+                    {
+                        URI uri = new URI( redirectUrl );
+                        if ( uri.getAuthority() == null )
+                        {
+                            // No http:// ftp:// or other authority, so it must be relative to webapp /
+                            if ( !redirectUrl.startsWith( "/" ) )
+                            {
+                                redirectUrl = "/" + redirectUrl;
+                            }
+                        }
+                    }
+                    catch( URISyntaxException e )
+                    {
+                        // The user supplied a STRANGE reference
+                        log.error( "Strange special page reference: " + redirectUrl );
+                    }
+                    
+                    // Add a new RedirectResolution for the special page
                     RedirectResolution resolution = m_specialRedirects.get( specialPage );
                     if( resolution == null )
                     {

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorInfo.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorInfo.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorInfo.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorInfo.java Sun Dec  7 23:45:46 2008
@@ -34,7 +34,7 @@
     public VariableInfo[] getVariableInfo(TagData data)
     {
         VariableInfo[] var = { new VariableInfo( data.getAttributeString("id"),
-                                                 "com.ecyrd.jspwiki.SearchResult",
+                                                 "com.ecyrd.jspwiki.search.SearchResult",
                                                  true,
                                                  VariableInfo.NESTED )
         };

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JSPWikiJspTransformer.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JSPWikiJspTransformer.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JSPWikiJspTransformer.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JSPWikiJspTransformer.java Sun Dec  7 23:45:46 2008
@@ -10,7 +10,10 @@
 import com.ecyrd.jspwiki.WikiContext;
 import com.ecyrd.jspwiki.action.WikiActionBean;
 import com.ecyrd.jspwiki.action.WikiContextFactory;
+import com.ecyrd.jspwiki.search.SearchResult;
 import com.ecyrd.jspwiki.ui.stripes.HandlerInfo;
+import com.ecyrd.jspwiki.util.FileUtil;
+import com.ecyrd.jspwiki.util.TextUtil;
 
 /**
  * Transforms a JspDocument from standard JSP markup to Stripes markup.
@@ -154,11 +157,54 @@
                     message( node, "Changed WikiContext.findContext() statement to WikiContextFactory.findContext()." );
 
                     // Make sure we have a page import statement!
-                    List<Tag> imports = doc.getPageImport( WikiContextFactory.class.getName() );
-                    if( imports.size() == 0 )
+                    doc.addPageImportDirective( WikiContextFactory.class );
+                }
+                
+            }
+            
+            // Make sure we have imports for any classes that moved
+            verifyImports( doc, SearchResult.class, FileUtil.class, TextUtil.class );
+            
+        }
+    }
+
+    /**
+     * Verifies that JSP page imports are available for a variable array of Classes.
+     * If a class does not have a corresponding import (either for the class
+     * specifically or for its enclosing package), one will be added.
+     * @param doc the JspDocument to check
+     * @param clazzes the classes to verify imports for
+     */
+    private void verifyImports( JspDocument doc, Class... clazzes )
+    {
+        // Build the regex Pattern to search for, and a lookup Map
+        Map<String,Class> classNames = new HashMap<String,Class>();
+        StringBuilder s = new StringBuilder();
+        s.append( '(' );
+        for ( Class clazz : clazzes )
+        {
+            classNames.put( clazz.getSimpleName(), clazz );
+            s.append( clazz.getSimpleName() );
+            s.append( '|' );
+        }
+        s.deleteCharAt( s.length() - 1 );
+        s.append( ')' );
+        Pattern searchPattern = Pattern.compile( s.toString() );
+
+        // Iterate through each script node and look for the classes that match
+        List<Node> nodes = doc.getScriptNodes();
+        for ( Node node : nodes )
+        {
+            Matcher m = searchPattern.matcher( node.getValue() );
+            while( m.find() )
+            {
+                String found= m.group( 1 ).trim();
+                Class foundClass = classNames.get( found );
+                if ( foundClass != null )
+                {
+                    if ( doc.addPageImportDirective( foundClass ) )
                     {
-                        doc.addPageImportDirective( WikiContextFactory.class.getName() );
-                        message( node, "Added page import for WikiContextFactory." );
+                        message( node, "Added page import for " + foundClass + "." );
                     }
                 }
             }

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JspDocument.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JspDocument.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JspDocument.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/migrator/JspDocument.java Sun Dec  7 23:45:46 2008
@@ -33,6 +33,57 @@
         visitChildren( allNodes, root.getChildren() );
         return Collections.unmodifiableList( allNodes );
     }
+    
+    /**
+     * Returns a list of nodes contained in the JspDocument that contain Java
+     * code, in the order parsed (depth-first search). Nodes that are of type
+     * {@link NodeType#JSP_DECLARATION}, {@link NodeType#SCRIPTLET},
+     * {@link NodeType#JSP_EXPRESSION} or {@link NodeType#CDATA} are considered
+     * to contain Java code. Attributes contained within Tags that are JSP expressions
+     * are also returned. The list returned is a defensive copy of the
+     * internally cached list.
+     * 
+     * @return the list of nodes
+     */
+    public List<Node> getScriptNodes()
+    {
+        List<Node> scriptNodes = new ArrayList<Node>();
+        List<Node> nodes = getNodes();
+        for ( Node node : nodes )
+        {
+            switch ( node.getType() )
+            {
+                case CDATA:
+                case JSP_DECLARATION:
+                case JSP_EXPRESSION:
+                case SCRIPTLET:
+                {
+                    scriptNodes.add( node );
+                    break;
+                }
+                case START_TAG:
+                case EMPTY_ELEMENT_TAG:
+                {
+                    Tag tag = (Tag)node;
+                    for ( Attribute attribute : tag.getAttributes() )
+                    {
+                        if ( attribute.getType() == NodeType.ATTRIBUTE )
+                        {
+                            for ( Node attributeNode : attribute.getChildren() )
+                            {
+                                if ( attributeNode.getType() == NodeType.JSP_EXPRESSION )
+                                {
+                                    scriptNodes.add( attributeNode );
+                                }
+                            }
+                        }
+                    }
+                    break;
+                }
+            }
+        }
+        return scriptNodes;
+    }
 
     /**
      * Returns the list of nodes contained in the JspDocument, of a specified
@@ -55,15 +106,26 @@
     }
 
     /**
-     * Convenience method that inserts a page-import directive after the last
-     * directive in the document.
-     * 
-     * @param type the type to add, <em>e.g.,</em> <code>org.foo.Bar</code>
+     * Convenience method that inserts a page-import directive for a supplied class
+     * after the last directive in the document. If an import directive already exists
+     * for this class (or for its containing package), it is not added.
+     *
+     * @param clazz the type to add, <em>e.g.,</em> <code>org.foo.Bar</code>
      *            or <code>org.foo.*</code>
+     *  @return <code>true</code> if an import was actually added, <code>false</code>
+     *  otherwise
      */
-    public void addPageImportDirective( String type )
+    public boolean addPageImportDirective( Class clazz )
     {
+        // No need to add it if it's already there
+        List<Tag> imports = getPageImport( clazz );
+        if( imports.size() > 0 )
+        {
+            return false;
+        }
+        
         // Create new directive
+        String type = clazz.getName();
         Tag directive = new Tag( this, NodeType.JSP_DIRECTIVE );
         directive.setName( "page" );
         directive.addAttribute( new Attribute( this, "import", type ) );
@@ -86,7 +148,7 @@
             lastDirective.addSibling( directive );
             lastDirective.addSibling( linebreak );
         }
-
+        return true;
     }
 
     /**
@@ -139,15 +201,16 @@
      * <li>&lt;%@ page import="org.bar.*" %&gt;</li>
      * </ul>
      * 
-     * @param type the class, interface or other type to match
+     * @param clazz the class, interface or other type to match
      * @return a list of all matching tags, which may be a zero-length list
      */
-    public List<Tag> getPageImport( String type )
+    public List<Tag> getPageImport( Class clazz )
     {
-        if( type == null )
+        if( clazz == null )
         {
-            throw new IllegalArgumentException( "Type cannot be null." );
+            throw new IllegalArgumentException( "Class cannot be null." );
         }
+        String type = clazz.getName();
         int periodPosition = type.lastIndexOf( '.' );
         String wildcardType = periodPosition == -1 ? "*" : type.substring( 0, periodPosition ) + ".*";
         List<Node> directives = getNodes( NodeType.JSP_DIRECTIVE );

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/GroupTypeConverter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/GroupTypeConverter.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/GroupTypeConverter.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/GroupTypeConverter.java Sun Dec  7 23:45:46 2008
@@ -49,7 +49,7 @@
      * method will add a validation error to the supplied Collection of errors.
      * The error will be of type
      * {@link net.sourceforge.stripes.validation.LocalizableError} and will have
-     * a message key of <code>pageNotFound</code> and a single parameter
+     * a message key of <code>group.doesnotexist</code> and a single parameter
      * (equal to the value passed for <code>groupName</code>).
      * 
      * @param groupName the name of the WikiPage to retrieve
@@ -70,7 +70,7 @@
         }
         catch( NoSuchPrincipalException e )
         {
-            errors.add( new LocalizableError( "groupNotFound", groupName ) );
+            errors.add( new LocalizableError( "group.doesnotexist", groupName ) );
         }
         return group;
     }

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerInfo.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerInfo.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerInfo.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerInfo.java Sun Dec  7 23:45:46 2008
@@ -57,7 +57,10 @@
      * {@link HandlerPermission} annotation to determine the correct Permission
      * needed to execute the event (if supplied). Finally, attempts to determine
      * the name of the wiki request context by looking for a
-     * {@link WikiRequestContext} annotation.
+     * {@link WikiRequestContext} annotation. If the event handler method does
+     * not contain a WikiRequestContext annotation, a default wiki request
+     * context will be assigned, based on the ActionBean name plus "." plus the
+     * method name.
      * 
      * @param beanClass the ActionBean implementation for which event
      *            information should be created
@@ -325,20 +328,36 @@
     }
 
     /**
-     * Returns the Permission required to execute the method in the context of
-     * the supplied WikiActionBean, based on its {@link HandlerPermission}
-     * annotation. Any EL expressions found in the annotated target or actions
-     * are evaluated. Note that this method returns <code>null</code> if no
-     * Permission is required to execute this method, and
-     * <em>callers should check for nulls</code>.
+     * <p>
+     * Returns a dynamic Permission based on the combination of the handler
+     * method's {@link HandlerPermission} annotation and a supplied object,
+     * which is evaluated to populate the Permission target and/or actions. The
+     * object supplied must be an object with standard bean property accessors
+     * and mutators (get/set methods). Any EL expressions found in the
+     * HandlerPermission's target or actions are evaluated against the object.
+     * Note that this method returns <code>null</code> if no HandlerPermission
+     * annotation was supplied for the handler method;
+     * <em>callers should check for nulls</em>.
+     * </p>
+     * <p>
+     * For example, suppose the HandlerPermission annotation for the
+     * <code>view()</code> handler method is
+     * </p>
+     * <blockquote><code>&#064;HandlerPermission(permissionClass=PagePermission.class, target="${page.qualifiedName}", actions=PagePermission.VIEW_ACTION)</code></blockquote>
+     * <p>
+     * If <code>object</code> is a ViewActionBean whose <code>getPage()</code>
+     * property returns page "Main" in the wiki named "Default", the returned
+     * Permission will be:
+     * </p>
+     * <blockquote><code>PagePermission "Default:Main", "view"</code></blockquote>
      * 
-     * @param actionBean the ActionBean that will be used as the base for any EL
+     * @param object the Object that will be used as the base for any EL
      *            expressions
      * @return the resolved and instantiated Permission
      * @throws ELException if EL expressions cannot be parsed, or of the
      *             Permission itself cannot be instantiated for any reason
      */
-    public Permission getPermission( WikiActionBean actionBean ) throws ELException
+    public Permission getPermission( Object object ) throws ELException
     {
         if( m_permissionClass == null )
         {
@@ -353,7 +372,7 @@
         // Evaluate the target, if it's an expression
         if( m_permissionTargetExpression != null )
         {
-            PropertyExpressionEvaluation evaluation = new PropertyExpressionEvaluation( m_permissionTargetExpression, actionBean );
+            PropertyExpressionEvaluation evaluation = new PropertyExpressionEvaluation( m_permissionTargetExpression, object );
             target = (String) evaluation.getValue();
             if( target == null )
             {
@@ -367,7 +386,7 @@
         // Evaluate the actions, if it's an expression
         if( m_permissionActionExpression != null )
         {
-            PropertyExpressionEvaluation evaluation = new PropertyExpressionEvaluation( m_permissionActionExpression, actionBean );
+            PropertyExpressionEvaluation evaluation = new PropertyExpressionEvaluation( m_permissionActionExpression, object );
             actions = (String) evaluation.getValue();
             if( actions == null )
             {

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java Sun Dec  7 23:45:46 2008
@@ -86,8 +86,7 @@
     }
 
     /**
-     *  {@inheritDoc}. Also calls {@link DefaultWikiContext#setHttpRequest(HttpServletRequest)} on
-     *  the DefaultWikiContext delegate.
+     *  {@inheritDoc}.
      */
     @Override
     public void setEventName( String eventName )

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java Sun Dec  7 23:45:46 2008
@@ -196,11 +196,18 @@
         // Get the resolved ActionBean and event handler method
         WikiActionBean actionBean = (WikiActionBean) context.getActionBean();
         Method handler = context.getHandler();
+        
+        // Make sure we set the WikiContext request context, while we're at it
+        Map<Method, HandlerInfo> eventinfos = HandlerInfo.getHandlerInfoCollection( actionBean.getClass() );
+        HandlerInfo eventInfo = eventinfos.get( handler );
+        if ( eventInfo != null )
+        {
+            String requestContext = eventInfo.getRequestContext();
+            actionBean.getContext().setRequestContext( requestContext );
+        }
 
         // Does the event handler have a required permission?
         boolean allowed = true;
-        Map<Method, HandlerInfo> handlerInfos = HandlerInfo.getHandlerInfoCollection( actionBean.getClass() );
-        HandlerInfo eventInfo = handlerInfos.get( handler );
         if( eventInfo != null )
         {
             Permission requiredPermission = eventInfo.getPermission( actionBean );

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java Sun Dec  7 23:45:46 2008
@@ -48,7 +48,7 @@
      * exist), this method will add a validation error to the supplied
      * Collection of errors and return <code>null</code>. The error will be
      * of type {@link net.sourceforge.stripes.validation.LocalizableError} and
-     * will have a message key of <code>pageNotFound</code> and a single
+     * will have a message key of <code>common.nopage</code> and a single
      * parameter (equal to the value passed for <code>pageName</code>).
      * 
      * @param pageName the name of the WikiPage to retrieve
@@ -69,7 +69,7 @@
                 String finalName = engine.getWikiContextFactory().getFinalPageName( pageName );
                 if( finalName == null || engine.getPage( finalName ) == null )
                 {
-                    errors.add( new LocalizableError( "pageNotFound", pageName ) );
+                    errors.add( new LocalizableError( "common.nopage", pageName ) );
                 }
             }
             catch( ProviderException e )

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Captcha.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Captcha.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Captcha.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Captcha.jsp Sun Dec  7 23:45:46 2008
@@ -87,15 +87,15 @@
 <div style="margin: 8px">
    <p><fmt:message key="captcha.description" /></p>
 
-   <form action="<wiki:Link jsp='Captcha.jsp' format='url'/>" method="post" id="mainForm" style="display: none;">
+   <form action="<wiki:Link jsp='Captcha.jsp' format='url' />" method="post" id="mainForm" style="display: none;">
       <input type="hidden" value="foo" name="text" />
-      <input type="hidden" value='<%=request.getParameter("page")%>' name='page'/>
+      <input type="hidden" value='<%=request.getParameter("page")%>' name='page' />
       <script type="text/javascript" src="http://challenge.asirra.com/js/AsirraClientSide.js"></script>
       <script type="text/javascript">
          asirraState.SetEnlargedPosition("right");
          // asirraState.SetCellsPerRow(6);
       </script>
-      <br />
+      <br/>
       <input type="button" value="<fmt:message key="captcha.submit" />" onclick="javascript:Asirra_CheckIfHuman(HumanCheckComplete)" />
   </form>
 </div>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Comment.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Comment.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Comment.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Comment.jsp Sun Dec  7 23:45:46 2008
@@ -17,6 +17,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.CommentActionBean" event="comment" />
 <%!
     Logger log = LoggerFactory.getLogger("JSPWiki");

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp Sun Dec  7 23:45:46 2008
@@ -9,6 +9,7 @@
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.EditActionBean" event="edit" />
 
 <%!

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Error.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Error.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Error.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Error.jsp Sun Dec  7 23:45:46 2008
@@ -5,6 +5,7 @@
 <%@ page import="com.ecyrd.jspwiki.action.*" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.FileUtil" %>
 <%! 
     Logger log = LoggerFactory.getLogger("JSPWiki"); 
 %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Message.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Message.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Message.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Message.jsp Sun Dec  7 23:45:46 2008
@@ -3,6 +3,7 @@
 <%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
 <%@ page import="com.ecyrd.jspwiki.*" %>
 <%@ page import="com.ecyrd.jspwiki.action.*" %>
+<%@ page import="com.ecyrd.jspwiki.ui.stripes.*" %>
 <%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/PageModified.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/PageModified.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/PageModified.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/PageModified.jsp Sun Dec  7 23:45:46 2008
@@ -6,6 +6,7 @@
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.PageModifiedActionBean" event="conflict" />
 
 <%! 

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Rename.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Rename.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Rename.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Rename.jsp Sun Dec  7 23:45:46 2008
@@ -8,6 +8,7 @@
 <%@ page import="java.util.*" %>
 <%@ page import="java.text.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.RenameActionBean" event="rename" />
 <%!
     Logger log = LoggerFactory.getLogger("JSPWiki");

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp Sun Dec  7 23:45:46 2008
@@ -5,8 +5,10 @@
 <%@ page import="com.ecyrd.jspwiki.auth.permissions.*" %>
 <%@ page import="java.util.*" %>
 <%@ page errorPage="/Error.jsp" %>
+<%@ page import="com.ecyrd.jspwiki.search.*" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.SearchActionBean" event="find" />
 
 <%! 

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Wiki.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Wiki.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Wiki.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Wiki.jsp Sun Dec  7 23:45:46 2008
@@ -18,14 +18,6 @@
     WikiContext wikiContext = WikiContextFactory.findContext( pageContext );
     String pagereq = wikiContext.getPage().getName();
 
-    // Redirect if the request was for a special page
-    String redirect = wiki.getWikiContextFactory().getSpecialPageReference( pagereq );
-    if( redirect != null )
-    {
-        response.sendRedirect( wikiContext.getViewURL( redirect ) );
-        return;
-    }
-    
     StopWatch sw = new StopWatch();
     sw.start();
     WatchDog w = wiki.getCurrentWatchDog();

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/Admin.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/Admin.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/Admin.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/Admin.jsp Sun Dec  7 23:45:46 2008
@@ -6,6 +6,7 @@
 <%@ page import="org.apache.commons.lang.time.StopWatch" %>
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%! 
     Logger log = LoggerFactory.getLogger("JSPWiki"); 
 %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/SecurityConfig.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/SecurityConfig.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/SecurityConfig.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/admin/SecurityConfig.jsp Sun Dec  7 23:45:46 2008
@@ -6,6 +6,7 @@
 <%@ page import="com.ecyrd.jspwiki.auth.*" %>
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.NoneActionBean" event="none" />
 <%! 
   public void jspInit()

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXPreview.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXPreview.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXPreview.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXPreview.jsp Sun Dec  7 23:45:46 2008
@@ -1,5 +1,5 @@
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
-<%@ page language="java" pageEncoding="UTF-8"%>
+<%@ page language="java" pageEncoding="UTF-8" %>
 <%@ page import="com.ecyrd.jspwiki.log.Logger" %>
 <%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
 <%@ page import="com.ecyrd.jspwiki.*" %>
@@ -7,6 +7,8 @@
 <%@ page import="com.ecyrd.jspwiki.auth.permissions.*" %>
 <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.ViewActionBean" event="view" />
 <%! 
   public void jspInit()
   {

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp Sun Dec  7 23:45:46 2008
@@ -14,6 +14,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.search.SearchResult" %>
 <stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.SearchActionBean" event="find" />
 <%! 
   public void jspInit()

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp Sun Dec  7 23:45:46 2008
@@ -7,6 +7,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%
   int MAXATTACHNAMELENGTH = 30;
   WikiContext c = WikiContextFactory.findContext( pageContext );

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/EditGroupContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/EditGroupContent.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/EditGroupContent.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/EditGroupContent.jsp Sun Dec  7 23:45:46 2008
@@ -11,6 +11,7 @@
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%!
     Logger log = LoggerFactory.getLogger("JSPWiki");
 %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/GroupContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/GroupContent.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/GroupContent.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/GroupContent.jsp Sun Dec  7 23:45:46 2008
@@ -13,6 +13,7 @@
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%!
   Logger log = LoggerFactory.getLogger("JSPWiki");
 %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp Sun Dec  7 23:45:46 2008
@@ -10,6 +10,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%
   WikiContext c = WikiContextFactory.findContext( pageContext );
   WikiPage wikiPage = c.getPage();

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/NewGroupContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/NewGroupContent.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/NewGroupContent.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/NewGroupContent.jsp Sun Dec  7 23:45:46 2008
@@ -10,6 +10,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%
   // Extract the group name and members
   String name = request.getParameter( "group" );

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp Sun Dec  7 23:45:46 2008
@@ -3,7 +3,9 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
-<%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %><%--CHECK why is this needed --%>
+<%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
+<%--CHECK why is this needed --%>
 <%
 	WikiContext c = WikiContextFactory.findContext( pageContext );
    	WikiPage p = c.getPage();

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp Sun Dec  7 23:45:46 2008
@@ -7,6 +7,7 @@
 <%@ page import="com.ecyrd.jspwiki.render.*" %>
 <%@ page import="com.ecyrd.jspwiki.parser.JSPWikiMarkupParser" %>
 <%@ page import="com.ecyrd.jspwiki.ui.*" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%@ page import="com.ecyrd.jspwiki.filters.*" %>
 <%@ page import="org.apache.commons.lang.*" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp Sun Dec  7 23:45:46 2008
@@ -12,6 +12,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%--
         This is a plain editor for JSPWiki.
 --%>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/preview.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/preview.jsp?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/preview.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/preview.jsp Sun Dec  7 23:45:46 2008
@@ -7,6 +7,7 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib uri="/WEB-INF/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
+<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
 <%--
         This is a special editor component for JSPWiki preview storage.
 --%>

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java Sun Dec  7 23:45:46 2008
@@ -29,7 +29,7 @@
         }
     }
     
-    public void testActionBean() throws Exception {
+    public void testView() throws Exception {
         // Save page Main
         m_engine.saveText("Test", "This is a test.");
         WikiPage page = m_engine.getPage("Test");
@@ -48,7 +48,7 @@
         assertEquals("/Wiki.action", trip.getDestination() );
     }
     
-    public void testActionBeanNoParameter() throws Exception {
+    public void testViewNoParameter() throws Exception {
         // Save page Main
         m_engine.saveText("Main", "This is the main page.");
         WikiPage page = m_engine.getPage("Main");
@@ -67,6 +67,21 @@
         assertEquals("/Wiki.action", trip.getDestination() );
     }
     
+    public void testSpecialPage() throws Exception {
+        
+        // Execute the request with a 'special page' reference
+        MockRoundtrip trip = m_engine.guestTrip( "/Wiki.action");
+        trip.addParameter( "page","FindPage" );
+        trip.execute("view");
+
+        // ...we should get a null for the 'page' property
+        ViewActionBean bean = trip.getActionBean(ViewActionBean.class);
+        assertEquals( null, bean.getPage() );
+        
+        // ...and the destination should be Search.jsp
+        assertEquals("/Search.jsp", trip.getDestination() );
+    }
+
     public static Test suite()
     {
         return new TestSuite( ViewActionBeanTest.class );

Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java?rev=724275&r1=724274&r2=724275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java Sun Dec  7 23:45:46 2008
@@ -4,19 +4,24 @@
  */
 
 package com.ecyrd.jspwiki.action;
+import java.util.Locale;
 import java.util.Properties;
 
-import org.apache.jspwiki.api.WikiException;
-
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
+import net.sourceforge.stripes.action.RedirectResolution;
 import net.sourceforge.stripes.mock.MockHttpServletRequest;
 import net.sourceforge.stripes.mock.MockHttpServletResponse;
 import net.sourceforge.stripes.mock.MockHttpSession;
 import net.sourceforge.stripes.mock.MockRoundtrip;
 
-import com.ecyrd.jspwiki.*;
+import org.apache.jspwiki.api.WikiException;
+
+import com.ecyrd.jspwiki.TestEngine;
+import com.ecyrd.jspwiki.WikiContext;
+import com.ecyrd.jspwiki.WikiEngine;
+import com.ecyrd.jspwiki.WikiPage;
 
 public class WikiContextFactoryTest extends TestCase
 {
@@ -153,16 +158,16 @@
     
     public void testSpecialPageReference()
     {
-        String url;
-        url = resolver.getSpecialPageReference( "RecentChanges" );
-        assertEquals( "RecentChanges.jsp", url );
+        RedirectResolution r;
+        r = resolver.getSpecialPageResolution( "RecentChanges" );
+        assertEquals( "/RecentChanges.jsp", r.getUrl( Locale.getDefault() ) );
         
-        url = resolver.getSpecialPageReference( "FindPage" );
-        assertEquals( "Search.jsp", url );
+        r = resolver.getSpecialPageResolution( "FindPage" );
+        assertEquals( "/Search.jsp", r.getUrl( Locale.getDefault() ) );
         
         // UserPrefs doesn't exist in our test properties
-        url = resolver.getSpecialPageReference( "UserPrefs" );
-        assertNull( url );
+        r = resolver.getSpecialPageResolution( "UserPrefs" );
+        assertNull( r );
     }
 
     public static Test suite()



Mime
View raw message