Examples of ErrorCodeRequestHandler


Examples of org.apache.wicket.request.http.handler.ErrorCodeRequestHandler

   *            the optional message to send to the client
   * @see javax.servlet.http.HttpServletResponse
   */
  public AbortWithHttpErrorCodeException(final int errorCode, final String message)
  {
    super(new ErrorCodeRequestHandler(errorCode, message));
    this.errorCode = errorCode;
    this.message = message;
  }
View Full Code Here

Examples of org.apache.wicket.request.http.handler.ErrorCodeRequestHandler

          if (log.isErrorEnabled())
          {
            log.error("key: " + PAGE_CLASS + " is null.");
          }
          getRequestCycle().replaceAllRequestHandlers(
            new ErrorCodeRequestHandler(404,
              "Could not find sources for the page you requested"));
        }
        if (!pageParam.startsWith("org.apache.wicket.examples"))
        {
          if (log.isErrorEnabled())
          {
            log.error("user is trying to access class: " + pageParam +
              " which is not in the scope of org.apache.wicket.examples");
          }
          throw new UnauthorizedInstantiationException(getClass());
        }
        page = (Class<? extends Page>)Class.forName(getPageParam());
      }
      catch (ClassNotFoundException e)
      {
        getRequestCycle().replaceAllRequestHandlers(
          new ErrorCodeRequestHandler(404,
            "Could not find sources for the page you requested"));
      }
    }
    return page;
  }
View Full Code Here

Examples of org.apache.wicket.request.http.handler.ErrorCodeRequestHandler

          if (log.isErrorEnabled())
          {
            log.error("key: " + PAGE_CLASS + " is null.");
          }
          getRequestCycle().replaceAllRequestHandlers(
            new ErrorCodeRequestHandler(404,
              "Could not find sources for the page you requested"));
        }
        if (!pageParam.startsWith("org.apache.wicket.examples"))
        {
          if (log.isErrorEnabled())
          {
            log.error("user is trying to access class: " + pageParam +
              " which is not in the scope of org.apache.wicket.examples");
          }
          throw new UnauthorizedInstantiationException(getClass());
        }
        page = (Class<? extends Page>)Class.forName(getPageParam());
      }
      catch (ClassNotFoundException e)
      {
        getRequestCycle().replaceAllRequestHandlers(
          new ErrorCodeRequestHandler(404,
            "Could not find sources for the page you requested"));
      }
    }
    return page;
  }
View Full Code Here

Examples of org.apache.wicket.request.http.handler.ErrorCodeRequestHandler

   *            {@link javax.servlet.http.HttpServletResponse} constants
   * @see javax.servlet.http.HttpServletResponse
   */
  public AbortWithHttpErrorCodeException(int errorCode, String message)
  {
    super(new ErrorCodeRequestHandler(errorCode, message));
    this.errorCode = errorCode;
    this.message = message;
  }
View Full Code Here

Examples of org.apache.wicket.request.http.handler.ErrorCodeRequestHandler

        if (log.isErrorEnabled())
        {
          log.error("key: " + PAGE_CLASS + " is null.");
        }
        getRequestCycle().replaceAllRequestHandlers(
          new ErrorCodeRequestHandler(404,
            "Could not find sources for the page you requested"));
      }
      else if (!pageParam.startsWith("org.apache.wicket.examples"))
      {
        if (log.isErrorEnabled())
        {
          log.error("user is trying to access class: " + pageParam
            + " which is not in the scope of org.apache.wicket.examples");
        }
        throw new UnauthorizedInstantiationException(getClass());
      }
      page = WicketObjects.resolveClass(pageParam);

      if (page == null)
      {
        getRequestCycle().replaceAllRequestHandlers(
          new ErrorCodeRequestHandler(404,
            "Could not find sources for the page you requested"));
      }
    }
    return page;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.