Package net.buffalo.request

Examples of net.buffalo.request.RequestWorker


      HttpServletResponse response) throws ServletException, IOException {
    RequestContextUtil.createRequestContext(getServletContext(), request, response);
    String pathInfo = request.getPathInfo();
   
    LOG.debug("request path info: " + pathInfo);
    RequestWorker worker = null;
    if (pathInfo == null || pathInfo.equals("/")) {
      worker = new ViewWorker();
    } else if (pathInfo.startsWith("/view/")) {
      worker = new ViewWorker();
    } else if (pathInfo.startsWith("/buffalo/")) {
      worker = new BuffaloWorker();
    } else if (pathInfo.startsWith("/upload/")) {
      worker = new UploadWorker();
    } else {
      throw new ServletException("Cannot find the request worker!");
    }
   
    try {
      worker.validate(request, response);
    } catch (ValidationException ex) {
      throw new ServletException("Service validation error", ex);
    }
   
    worker.processRequest(request, response);
  }
View Full Code Here

TOP

Related Classes of net.buffalo.request.RequestWorker

Copyright © 2018 www.massapicom. 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.