OK, this is *really* strange. I can't offhand see any place where this could possibly happen.

Please do some additional debugging. Good place to step through or add debug statements are WikiEngine.initialize() [which sets the baseURL].

Another thing which might be confusing JSPWiki is that if there is another instance of jspwiki.properties somewhere in the classpath, or that you're cascading the property files.

If you're on UNIX/Mac, I would do a "find / -type f | xargs grep baseURL | grep "localhost:8080" and see what comes out.

/Janne

On 24 May 2008, at 03:52, Terry Steichen wrote:

Even more fundamentally, when debugging Edit.jsp, when I add this item:
<wiki:Variable var='baseurl' />, it displays
"http://localhost:8080/TC4a/"; - even though the jswiki.properties
contains this entry:

        jspwiki.baseURL=http://192.168.1.109:8080/TC4a

It appears that - somehow - baseURL isn't being inputted properly.



On Fri, 2008-05-23 at 17:09 -0400, Terry Steichen wrote:

Janne,

Sorry I didn't get to this sooner, but been traveling and having
wireless connection problems.

Unfortunately your patch doesn't change the error.

I did some debugging and found that the problem is coming from
wiki.getViewURL(pagereq) [Edit.jsp, line 235]. In this particular case
'pagereq' is set to "Main" and the value returned by
wiki.getViewURL("Main") is
"http://localhost:8080/TC4a/Wiki.jsp?page=Main";.

Just to verify: I plugged in the actual url
("http://192.168.1.109:8080/TC4a";) and hit Cancel and it worked just
fine.

I don't have time at the moment to dig into WikiEngine.getViewURL (), but
that's clearly where the problem is.

Terry

On Wed, 2008-05-21 at 08:10 +0300, Janne Jalkanen wrote:

Terry, can you please try this patch on the current SVN trunk? Might
work also on the 2.6 branch...

/Janne

Index: /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp
===================================================================
--- /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp        (revision
658385)
+++ /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp (working copy)
@@ -114,7 +114,7 @@
              log.info("Page changed, warning user.");

              session.setAttribute( EditorManager.REQ_EDITEDTEXT,
EditorManager.getEditedText(pageContext) );
- response.sendRedirect( wiki.getURL (WikiContext.CONFLICT,
pagereq, null, false) );
+ response.sendRedirect( wiki.getURL (WikiContext.CONFLICT,
pagereq, null, true) );
              return;
          }

@@ -184,7 +184,7 @@
          }
          catch( DecisionRequiredException ex )
          {
-               String redirect = wikiContext.getURL
(WikiContext.VIEW,"ApprovalRequiredForPageChanges");
+               String redirect = wiki.getViewURL
("ApprovalRequiredForPageChanges");
              response.sendRedirect( redirect );
              return;
          }
@@ -219,7 +219,7 @@
          if( htmlText != null ) session.setAttribute
( EditorManager.REQ_EDITEDTEXT, text );

          session.setAttribute("changenote", changenote != null ?
changenote : "" );
-        response.sendRedirect( wiki.getURL
(WikiContext.PREVIEW,pagereq,null,false) );
+        response.sendRedirect( wiki.getURL
(WikiContext.PREVIEW,pagereq,null,true) );
          return;
      }
      else if( cancel != null )

Reply via email to