Package javax.servlet.http

Examples of javax.servlet.http.HttpServletResponse.sendError()


      if (i < 0) {
        if (log.isLoggable(Level.FINE))
          log.fine(L.l("no script path index for `{0}'", fullPath));

        res.sendError(HttpServletResponse.SC_NOT_FOUND);

        return;
      }

      scriptPath = fullPath.substring(0, i);
View Full Code Here


    if (! vfsPath.canRead() || vfsPath.isDirectory()) {
      if (log.isLoggable(Level.FINE))
        log.fine(L.l("script '{0}' is unreadable", vfsPath));

      res.sendError(HttpServletResponse.SC_NOT_FOUND);

      return;
    }

    String []env = createEnvironment(req, requestURI, contextPath,
View Full Code Here

                    out.print(resource);

                }
                catch (IOException e)
                {
                    resp.sendError(404);
                }

                return;
            }
View Full Code Here

                        SolandraCoreContainer.writeCoreResource(indexName, resourceName, resource);
                    }
                }
                catch (IOException e)
                {
                    resp.sendError(500);
                }
                return;
            }
        }
View Full Code Here

      _requestFacade.setInvocation(invocation);
      invocation.setWebApp(_server.getErrorWebApp());

      HttpServletResponse res = _responseFacade;
      res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);

      _server.restart();

      return null;
    }
View Full Code Here

      if (! webApp.enterWebApp() && webApp.getConfigException() == null) {
        if (response instanceof HttpServletResponse) {
          HttpServletResponse res = (HttpServletResponse) response;

          res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
        }

        return;
      }
View Full Code Here

    } catch (FileNotFoundException e) {
      log.log(Level.FINER, e.toString(), e);
     
      HttpServletResponse res = (HttpServletResponse) response;
     
      res.sendError(404);
    }
  }

  @Override
  public String toString()
View Full Code Here

      disp.dispatch(request, response);
    } catch (FileNotFoundException e) {
      log.log(Level.FINE, e.toString(), e);
     
      res.sendError(404);
    }
  }

  @Override
  public String toString()
View Full Code Here

   
    try {
      Page page = _servlet.getPage(req, res);

      if (page == null) {
        res.sendError(res.SC_NOT_FOUND);
        return;
      }
    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
       
View Full Code Here

    throws ServletException, IOException
  {
    HttpServletResponse res = (HttpServletResponse) response;

    if (_message != null)
      res.sendError(_errorCode, _message);
    else
      res.sendError(_errorCode);
  }

  @Override
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.