You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/01/28 20:34:17 UTC

[jspwiki] 16/32: JSPWIKI-120: propagate WikiEngine#createContext(..) to new WikiContext change on jsps

This is an automated email from the ASF dual-hosted git repository.

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit 719c1154d2589baa39a78545487c4f07686750ec
Author: juanpablo <ju...@apache.org>
AuthorDate: Mon Jan 20 22:35:06 2020 +0100

    JSPWIKI-120: propagate WikiEngine#createContext(..) to new WikiContext change on jsps
---
 jspwiki-war/src/main/webapp/Captcha.jsp                          | 2 +-
 jspwiki-war/src/main/webapp/Comment.jsp                          | 2 +-
 jspwiki-war/src/main/webapp/CookieError.jsp                      | 6 ++----
 jspwiki-war/src/main/webapp/Delete.jsp                           | 2 +-
 jspwiki-war/src/main/webapp/DeleteGroup.jsp                      | 2 +-
 jspwiki-war/src/main/webapp/Diff.jsp                             | 2 +-
 jspwiki-war/src/main/webapp/Edit.jsp                             | 2 +-
 jspwiki-war/src/main/webapp/EditGroup.jsp                        | 2 +-
 jspwiki-war/src/main/webapp/Error.jsp                            | 3 +--
 jspwiki-war/src/main/webapp/Group.jsp                            | 2 +-
 jspwiki-war/src/main/webapp/Install.jsp                          | 2 +-
 jspwiki-war/src/main/webapp/Login.jsp                            | 2 +-
 jspwiki-war/src/main/webapp/LoginForm.jsp                        | 2 +-
 jspwiki-war/src/main/webapp/LostPassword.jsp                     | 2 +-
 jspwiki-war/src/main/webapp/Message.jsp                          | 2 +-
 jspwiki-war/src/main/webapp/NewBlogEntry.jsp                     | 2 +-
 jspwiki-war/src/main/webapp/NewGroup.jsp                         | 2 +-
 jspwiki-war/src/main/webapp/PageInfo.jsp                         | 2 +-
 jspwiki-war/src/main/webapp/PageModified.jsp                     | 2 +-
 jspwiki-war/src/main/webapp/Preview.jsp                          | 2 +-
 jspwiki-war/src/main/webapp/Rename.jsp                           | 2 +-
 jspwiki-war/src/main/webapp/Search.jsp                           | 2 +-
 jspwiki-war/src/main/webapp/SisterSites.jsp                      | 2 +-
 jspwiki-war/src/main/webapp/Upload.jsp                           | 6 ++----
 jspwiki-war/src/main/webapp/UserPreferences.jsp                  | 2 +-
 jspwiki-war/src/main/webapp/Wiki.jsp                             | 2 +-
 jspwiki-war/src/main/webapp/Workflow.jsp                         | 2 +-
 jspwiki-war/src/main/webapp/XHRHtml2Markup.jsp                   | 2 +-
 jspwiki-war/src/main/webapp/admin/Admin.jsp                      | 5 ++---
 jspwiki-war/src/main/webapp/admin/SecurityConfig.jsp             | 5 ++---
 jspwiki-war/src/main/webapp/rss.jsp                              | 2 +-
 jspwiki-war/src/main/webapp/templates/default/AJAXCategories.jsp | 2 +-
 jspwiki-war/src/main/webapp/templates/default/AJAXPreview.jsp    | 2 +-
 jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp     | 2 +-
 34 files changed, 38 insertions(+), 45 deletions(-)

diff --git a/jspwiki-war/src/main/webapp/Captcha.jsp b/jspwiki-war/src/main/webapp/Captcha.jsp
index 83ee201..cc61882 100644
--- a/jspwiki-war/src/main/webapp/Captcha.jsp
+++ b/jspwiki-war/src/main/webapp/Captcha.jsp
@@ -37,7 +37,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     String pagereq = wikiContext.getName();
 
diff --git a/jspwiki-war/src/main/webapp/Comment.jsp b/jspwiki-war/src/main/webapp/Comment.jsp
index 5ef57e3..0ca43c5 100644
--- a/jspwiki-war/src/main/webapp/Comment.jsp
+++ b/jspwiki-war/src/main/webapp/Comment.jsp
@@ -59,7 +59,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.COMMENT );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.COMMENT );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/CookieError.jsp b/jspwiki-war/src/main/webapp/CookieError.jsp
index a2da236..b7cf4d7 100755
--- a/jspwiki-war/src/main/webapp/CookieError.jsp
+++ b/jspwiki-war/src/main/webapp/CookieError.jsp
@@ -23,11 +23,9 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context; authorization check not needed
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
  
     // Set the content type and include the response content
     response.setContentType("text/html; charset="+wiki.getContentEncoding() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext,
-                                                            wikiContext.getTemplate(),
-                                                            "CookieErrorTemplate.jsp" );
+    String contentPage = wiki.getTemplateManager().findJSP( pageContext, wikiContext.getTemplate(), "CookieErrorTemplate.jsp" );
 %><wiki:Include page="<%=contentPage%>" />
diff --git a/jspwiki-war/src/main/webapp/Delete.jsp b/jspwiki-war/src/main/webapp/Delete.jsp
index 40063d3..7dbe7d8 100644
--- a/jspwiki-war/src/main/webapp/Delete.jsp
+++ b/jspwiki-war/src/main/webapp/Delete.jsp
@@ -36,7 +36,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.DELETE );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.DELETE );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/DeleteGroup.jsp b/jspwiki-war/src/main/webapp/DeleteGroup.jsp
index 827c725..9f38ae6 100644
--- a/jspwiki-war/src/main/webapp/DeleteGroup.jsp
+++ b/jspwiki-war/src/main/webapp/DeleteGroup.jsp
@@ -33,7 +33,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.DELETE_GROUP );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.DELETE_GROUP );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
 
     WikiSession wikiSession = wikiContext.getWikiSession();
diff --git a/jspwiki-war/src/main/webapp/Diff.jsp b/jspwiki-war/src/main/webapp/Diff.jsp
index 7dfaec2..1d2ede4 100644
--- a/jspwiki-war/src/main/webapp/Diff.jsp
+++ b/jspwiki-war/src/main/webapp/Diff.jsp
@@ -33,7 +33,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.DIFF );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.DIFF );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/Edit.jsp b/jspwiki-war/src/main/webapp/Edit.jsp
index b572cae..3972ff3 100644
--- a/jspwiki-war/src/main/webapp/Edit.jsp
+++ b/jspwiki-war/src/main/webapp/Edit.jsp
@@ -49,7 +49,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.EDIT );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.EDIT );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) {
         return;
     }
diff --git a/jspwiki-war/src/main/webapp/EditGroup.jsp b/jspwiki-war/src/main/webapp/EditGroup.jsp
index e90726f..8f573fb 100644
--- a/jspwiki-war/src/main/webapp/EditGroup.jsp
+++ b/jspwiki-war/src/main/webapp/EditGroup.jsp
@@ -32,7 +32,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.EDIT_GROUP );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.EDIT_GROUP );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     // Extract the current user, group name, members and action attributes
diff --git a/jspwiki-war/src/main/webapp/Error.jsp b/jspwiki-war/src/main/webapp/Error.jsp
index 36fe2f4..86f3e76 100644
--- a/jspwiki-war/src/main/webapp/Error.jsp
+++ b/jspwiki-war/src/main/webapp/Error.jsp
@@ -27,8 +27,7 @@
 %>
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    WikiContext wikiContext = wiki.createContext( request,
-                                                  WikiContext.ERROR );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.ERROR );
     String pagereq = wikiContext.getName();
 
     response.setContentType("text/html; charset="+wiki.getContentEncoding() );
diff --git a/jspwiki-war/src/main/webapp/Group.jsp b/jspwiki-war/src/main/webapp/Group.jsp
index 6abcd7f..5fa3a32 100644
--- a/jspwiki-war/src/main/webapp/Group.jsp
+++ b/jspwiki-war/src/main/webapp/Group.jsp
@@ -33,7 +33,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW_GROUP );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW_GROUP );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     // Extract the current user, group name, members
diff --git a/jspwiki-war/src/main/webapp/Install.jsp b/jspwiki-war/src/main/webapp/Install.jsp
index c4a5979..1f87580 100644
--- a/jspwiki-war/src/main/webapp/Install.jsp
+++ b/jspwiki-war/src/main/webapp/Install.jsp
@@ -36,7 +36,7 @@
 <%
 WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
 // Create wiki context and check for authorization
-WikiContext wikiContext = wiki.createContext( request, WikiContext.INSTALL );
+WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.INSTALL );
 if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
 
 Installer installer = new Installer( request, config );
diff --git a/jspwiki-war/src/main/webapp/Login.jsp b/jspwiki-war/src/main/webapp/Login.jsp
index c5db736..7cbd41e 100644
--- a/jspwiki-war/src/main/webapp/Login.jsp
+++ b/jspwiki-war/src/main/webapp/Login.jsp
@@ -37,7 +37,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     AuthenticationManager mgr = wiki.getAuthenticationManager();
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.LOGIN );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.LOGIN );
     pageContext.setAttribute( WikiContext.ATTR_CONTEXT, wikiContext, PageContext.REQUEST_SCOPE );
     WikiSession wikiSession = wikiContext.getWikiSession();
     ResourceBundle rb = Preferences.getBundle( wikiContext, "CoreResources" );
diff --git a/jspwiki-war/src/main/webapp/LoginForm.jsp b/jspwiki-war/src/main/webapp/LoginForm.jsp
index e85cf90..d918357 100644
--- a/jspwiki-war/src/main/webapp/LoginForm.jsp
+++ b/jspwiki-war/src/main/webapp/LoginForm.jsp
@@ -41,7 +41,7 @@
     
     // If no context, it means we're using container auth.  So, create one anyway
     if( wikiContext == null ) {
-        wikiContext = wiki.createContext( request, WikiContext.LOGIN );
+        wikiContext = new WikiContext( wiki, request, WikiContext.LOGIN );
         pageContext.setAttribute( WikiContext.ATTR_CONTEXT, wikiContext, PageContext.REQUEST_SCOPE );
     }
     
diff --git a/jspwiki-war/src/main/webapp/LostPassword.jsp b/jspwiki-war/src/main/webapp/LostPassword.jsp
index 32ffab4..5c15297 100644
--- a/jspwiki-war/src/main/webapp/LostPassword.jsp
+++ b/jspwiki-war/src/main/webapp/LostPassword.jsp
@@ -104,7 +104,7 @@
 
     // If no context, it means we're using container auth.  So, create one anyway
     if( wikiContext == null ) {
-        wikiContext = wiki.createContext( request, WikiContext.LOGIN ); /* reuse login context ! */
+        wikiContext = new WikiContext( wiki, request, WikiContext.LOGIN ); /* reuse login context ! */
         pageContext.setAttribute( WikiContext.ATTR_CONTEXT, wikiContext, PageContext.REQUEST_SCOPE );
     }
 
diff --git a/jspwiki-war/src/main/webapp/Message.jsp b/jspwiki-war/src/main/webapp/Message.jsp
index 6338e15..fdff7a0 100755
--- a/jspwiki-war/src/main/webapp/Message.jsp
+++ b/jspwiki-war/src/main/webapp/Message.jsp
@@ -26,7 +26,7 @@
 %>
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.MESSAGE );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.MESSAGE );
 
     // Stash the wiki context and message text
     request.setAttribute( WikiContext.ATTR_CONTEXT, wikiContext );
diff --git a/jspwiki-war/src/main/webapp/NewBlogEntry.jsp b/jspwiki-war/src/main/webapp/NewBlogEntry.jsp
index 3021ad8..f8128fa 100644
--- a/jspwiki-war/src/main/webapp/NewBlogEntry.jsp
+++ b/jspwiki-war/src/main/webapp/NewBlogEntry.jsp
@@ -30,7 +30,7 @@
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context; no need to check for authorization since the 
     // redirect will take care of that
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.EDIT );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.EDIT );
     String pagereq = wikiContext.getName();
     
     // Redirect if the request was for a 'special page'
diff --git a/jspwiki-war/src/main/webapp/NewGroup.jsp b/jspwiki-war/src/main/webapp/NewGroup.jsp
index 2582e43..a7194e2 100644
--- a/jspwiki-war/src/main/webapp/NewGroup.jsp
+++ b/jspwiki-war/src/main/webapp/NewGroup.jsp
@@ -35,7 +35,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.CREATE_GROUP );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.CREATE_GROUP );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     // Extract the current user, group name, members and action attributes
diff --git a/jspwiki-war/src/main/webapp/PageInfo.jsp b/jspwiki-war/src/main/webapp/PageInfo.jsp
index 86885e4..fe5445c 100644
--- a/jspwiki-war/src/main/webapp/PageInfo.jsp
+++ b/jspwiki-war/src/main/webapp/PageInfo.jsp
@@ -31,7 +31,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.INFO );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.INFO );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/PageModified.jsp b/jspwiki-war/src/main/webapp/PageModified.jsp
index 9130123..b5f00a8 100644
--- a/jspwiki-war/src/main/webapp/PageModified.jsp
+++ b/jspwiki-war/src/main/webapp/PageModified.jsp
@@ -33,7 +33,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.CONFLICT );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.CONFLICT );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/Preview.jsp b/jspwiki-war/src/main/webapp/Preview.jsp
index 1058fda..31d39d0 100644
--- a/jspwiki-war/src/main/webapp/Preview.jsp
+++ b/jspwiki-war/src/main/webapp/Preview.jsp
@@ -32,7 +32,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.PREVIEW );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.PREVIEW );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/Rename.jsp b/jspwiki-war/src/main/webapp/Rename.jsp
index 2df7fa5..7d5b767 100644
--- a/jspwiki-war/src/main/webapp/Rename.jsp
+++ b/jspwiki-war/src/main/webapp/Rename.jsp
@@ -38,7 +38,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-	WikiContext wikiContext = wiki.createContext( request, WikiContext.RENAME );
+	WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.RENAME );
 	if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     if( wikiContext.getCommand().getTarget() == null ) {
         response.sendRedirect( wikiContext.getURL( wikiContext.getRequestContext(), wikiContext.getName() ) );
diff --git a/jspwiki-war/src/main/webapp/Search.jsp b/jspwiki-war/src/main/webapp/Search.jsp
index e373d9d..dce8b51 100644
--- a/jspwiki-war/src/main/webapp/Search.jsp
+++ b/jspwiki-war/src/main/webapp/Search.jsp
@@ -35,7 +35,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.FIND );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.FIND );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     String pagereq = wikiContext.getName();
 
diff --git a/jspwiki-war/src/main/webapp/SisterSites.jsp b/jspwiki-war/src/main/webapp/SisterSites.jsp
index 0870b73..067d9ef 100644
--- a/jspwiki-war/src/main/webapp/SisterSites.jsp
+++ b/jspwiki-war/src/main/webapp/SisterSites.jsp
@@ -35,7 +35,7 @@
      */
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, "rss" );
+    WikiContext wikiContext = new WikiContext( wiki, request, "rss" );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     Set< String > allPages = wiki.getReferenceManager().findCreated();
diff --git a/jspwiki-war/src/main/webapp/Upload.jsp b/jspwiki-war/src/main/webapp/Upload.jsp
index 4939588..db1002e 100644
--- a/jspwiki-war/src/main/webapp/Upload.jsp
+++ b/jspwiki-war/src/main/webapp/Upload.jsp
@@ -31,14 +31,12 @@
 <% 
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.UPLOAD );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.UPLOAD );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     String pagereq = wikiContext.getName();
 
     // Set the content type and include the response content
     response.setContentType("text/html; charset="+wiki.getContentEncoding() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext,
-                                                            wikiContext.getTemplate(),
-                                                            "UploadTemplate.jsp" );
+    String contentPage = wiki.getTemplateManager().findJSP( pageContext, wikiContext.getTemplate(), "UploadTemplate.jsp" );
 %><wiki:Include page="<%=contentPage%>" />
 
diff --git a/jspwiki-war/src/main/webapp/UserPreferences.jsp b/jspwiki-war/src/main/webapp/UserPreferences.jsp
index 7f58ded..101acb9 100644
--- a/jspwiki-war/src/main/webapp/UserPreferences.jsp
+++ b/jspwiki-war/src/main/webapp/UserPreferences.jsp
@@ -42,7 +42,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.PREFS );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.PREFS );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     // Extract the user profile and action attributes
diff --git a/jspwiki-war/src/main/webapp/Wiki.jsp b/jspwiki-war/src/main/webapp/Wiki.jsp
index 1726725..7dca137 100644
--- a/jspwiki-war/src/main/webapp/Wiki.jsp
+++ b/jspwiki-war/src/main/webapp/Wiki.jsp
@@ -31,7 +31,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
     if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
     String pagereq = wikiContext.getName();
 
diff --git a/jspwiki-war/src/main/webapp/Workflow.jsp b/jspwiki-war/src/main/webapp/Workflow.jsp
index 1abf46e..5c5b5d3 100644
--- a/jspwiki-war/src/main/webapp/Workflow.jsp
+++ b/jspwiki-war/src/main/webapp/Workflow.jsp
@@ -38,7 +38,7 @@
 <%
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.WORKFLOW );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.WORKFLOW );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     
     // Extract the wiki session
diff --git a/jspwiki-war/src/main/webapp/XHRHtml2Markup.jsp b/jspwiki-war/src/main/webapp/XHRHtml2Markup.jsp
index 3f1ace0..de0f96f 100644
--- a/jspwiki-war/src/main/webapp/XHRHtml2Markup.jsp
+++ b/jspwiki-war/src/main/webapp/XHRHtml2Markup.jsp
@@ -32,7 +32,7 @@
   WikiEngine wiki;
 %>
 <%
-  WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+  WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
 
   if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
 
diff --git a/jspwiki-war/src/main/webapp/admin/Admin.jsp b/jspwiki-war/src/main/webapp/admin/Admin.jsp
index d2c05a3..b6d3742 100644
--- a/jspwiki-war/src/main/webapp/admin/Admin.jsp
+++ b/jspwiki-war/src/main/webapp/admin/Admin.jsp
@@ -34,12 +34,11 @@
     String bean = request.getParameter("bean");
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.ADMIN );
+    WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.ADMIN );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
 
     //
-    //  This is an experimental feature, so we will turn it off unless the
-    //  user really wants to.
+    //  This is an experimental feature, so we will turn it off unless the user really wants to.
     //
     if( !TextUtil.isPositive(wiki.getWikiProperties().getProperty("jspwiki-x.adminui.enable")) )
     {
diff --git a/jspwiki-war/src/main/webapp/admin/SecurityConfig.jsp b/jspwiki-war/src/main/webapp/admin/SecurityConfig.jsp
index 508c1a0..f0f59de 100644
--- a/jspwiki-war/src/main/webapp/admin/SecurityConfig.jsp
+++ b/jspwiki-war/src/main/webapp/admin/SecurityConfig.jsp
@@ -37,14 +37,13 @@
 <!doctype html>
 <html lang="en" name="top">
 <%
-  WikiContext wikiContext = wiki.createContext( request, WikiContext.NONE );
+  WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.NONE );
   if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
   response.setContentType("text/html; charset="+wiki.getContentEncoding() );
   verifier = new SecurityVerifier( wiki, wikiContext.getWikiSession() );
 
   //
-  //  This is a security feature, so we will turn it off unless the
-  //  user really wants to.
+  //  This is a security feature, so we will turn it off unless the user really wants to.
   //
   if( !TextUtil.isPositive(wiki.getWikiProperties().getProperty("jspwiki-x.securityconfig.enable")) )
   {
diff --git a/jspwiki-war/src/main/webapp/rss.jsp b/jspwiki-war/src/main/webapp/rss.jsp
index 0adb70c..d58c2c2 100644
--- a/jspwiki-war/src/main/webapp/rss.jsp
+++ b/jspwiki-war/src/main/webapp/rss.jsp
@@ -49,7 +49,7 @@
     }
     WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
     // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, "rss" );
+    WikiContext wikiContext = new WikiContext( wiki, request, "rss" );
     if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
     WikiPage    wikipage    = wikiContext.getPage();
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/AJAXCategories.jsp b/jspwiki-war/src/main/webapp/templates/default/AJAXCategories.jsp
index 675fefc..9b7c9cb 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AJAXCategories.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AJAXCategories.jsp
@@ -29,7 +29,7 @@
 %>
 <%
   // Copied from a top-level jsp -- which would be a better place to put this 
-  WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+  WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
   if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
   String pagereq = wikiContext.getPage().getName();
 
diff --git a/jspwiki-war/src/main/webapp/templates/default/AJAXPreview.jsp b/jspwiki-war/src/main/webapp/templates/default/AJAXPreview.jsp
index c183837..996ef27 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AJAXPreview.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AJAXPreview.jsp
@@ -35,7 +35,7 @@
 %>
 <%
   // Copied from a top-level jsp -- which would be a better place to put this 
-  WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+  WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.VIEW );
   if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
 
   response.setContentType("text/html; charset="+wiki.getContentEncoding() );
diff --git a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
index 56c4ad1..8a1c672 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
@@ -47,7 +47,7 @@
   /* ********************* actual start ********************* */
   /* FIXME: too much hackin on this level -- should better happen in toplevel jsp's */
   /* Create wiki context and check for authorization */
-  WikiContext wikiContext = wiki.createContext( request, WikiContext.FIND );
+  WikiContext wikiContext = new WikiContext( wiki, request, WikiContext.FIND );
   if(!wiki.getAuthorizationManager().hasAccess( wikiContext, response )) return;
 
   String query = request.getParameter( "query");