com.caucho.server.webapp
Class ErrorPageManager

java.lang.Object
  extended by com.caucho.server.webapp.ErrorPageManager

public class ErrorPageManager
extends java.lang.Object

Represents the final servlet in a filter chain.


Field Summary
static java.lang.String JSP_EXCEPTION
           
static char[] MSIE_PADDING
           
static java.lang.String SHUTDOWN
           
 
Constructor Summary
ErrorPageManager(Server server)
          Create error page manager.
ErrorPageManager(Server server, Host host, WebApp app)
          Create error page manager.
ErrorPageManager(Server server, WebApp webApp)
          Create error page manager.
 
Method Summary
 void addErrorPage(ErrorPage errorPage)
          Adds an error page.
 ErrorPageManager getParent()
          Gets the manager parent.
protected  boolean isDevelopmentModeErrorPage()
          Returns true if we should return a development-friendly error page.
 void sendError(CauchoRequest request, CauchoResponse response, int code, java.lang.String message)
          Sends an HTTP error to the browser.
 void sendErrorImpl(CauchoRequest request, CauchoResponse response, int code, java.lang.String message)
          Sends an HTTP error to the browser.
 void sendServletError(java.lang.Throwable e, ServletRequest req, ServletResponse res)
          Displays a parse error.
 void sendServletErrorImpl(java.lang.Throwable e, ServletRequest req, ServletResponse res)
           
 void setParent(ErrorPageManager parent)
          Sets the manager parent.
 void setWebAppContainer(WebAppContainer appContainer)
          Sets the webApp container.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSIE_PADDING

public static final char[] MSIE_PADDING

JSP_EXCEPTION

public static java.lang.String JSP_EXCEPTION

SHUTDOWN

public static java.lang.String SHUTDOWN
Constructor Detail

ErrorPageManager

public ErrorPageManager(Server server)
Create error page manager.


ErrorPageManager

public ErrorPageManager(Server server,
                        WebApp webApp)
Create error page manager.


ErrorPageManager

public ErrorPageManager(Server server,
                        Host host,
                        WebApp app)
Create error page manager.

Method Detail

setParent

public void setParent(ErrorPageManager parent)
Sets the manager parent.


getParent

public ErrorPageManager getParent()
Gets the manager parent.


addErrorPage

public void addErrorPage(ErrorPage errorPage)
Adds an error page.


setWebAppContainer

public void setWebAppContainer(WebAppContainer appContainer)
Sets the webApp container.


isDevelopmentModeErrorPage

protected boolean isDevelopmentModeErrorPage()
Returns true if we should return a development-friendly error page.


sendServletError

public void sendServletError(java.lang.Throwable e,
                             ServletRequest req,
                             ServletResponse res)
                      throws java.io.IOException
Displays a parse error.

Throws:
java.io.IOException

sendServletErrorImpl

public void sendServletErrorImpl(java.lang.Throwable e,
                                 ServletRequest req,
                                 ServletResponse res)
                          throws java.io.IOException
Throws:
java.io.IOException

sendError

public void sendError(CauchoRequest request,
                      CauchoResponse response,
                      int code,
                      java.lang.String message)
               throws java.io.IOException
Sends an HTTP error to the browser.

Parameters:
code - the HTTP error code
message - a string message
Throws:
java.io.IOException

sendErrorImpl

public void sendErrorImpl(CauchoRequest request,
                          CauchoResponse response,
                          int code,
                          java.lang.String message)
                   throws java.io.IOException
Sends an HTTP error to the browser.

Parameters:
code - the HTTP error code
message - a string message
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object