anchor.diff:      {
           log.debug("Previewing "+pagereq);
           pageContext.forward( "Preview.jsp" );
  +    }
  +    else if( cancel != null )
  +    {
  +        log.debug("Cancelled editing "+pagereq);
  +        PageLock lock = (PageLock) session.getAttribute( "lock-"+pagereq );
  +
  +        if( lock != null )
  +        {
  +            wiki.getPageManager().unlockPage( lock );
  +            session.removeAttribute( "lock-"+pagereq );
  +        }
  +        response.sendRedirect( wiki.getViewURL(pagereq) );
  +        return;
       }
   
       log.info("Editing page "+pagereq+". User="+request.getRemoteUser()+", host="+request.getRemoteHost() );
  
positive.code:     String action  = request.getParameter("action");
      String ok      = request.getParameter("ok");
      String preview = request.getParameter("preview");
  
      //
      //  Set the response type before we branch.
      //
  
      response.setContentType("text/html; charset="+wiki.getContentEncoding() );
  
      //log.debug("Request character encoding="+request.getCharacterEncoding());
      //log.debug("Request content type+"+request.getContentType());
  
negative.code:                               Long.toString( lastchange ),
                                PageContext.REQUEST_SCOPE );
  
      PageLock lock = wiki.getPageManager().lockPage( wikipage, 
                                                      wiki.getValidUserName(request) );
  
      session.setAttribute( "lock-"+pagereq, lock );
  
      String contentPage = "templates/"+skin+"/EditTemplate.jsp";
  %>
  
  