com.acsinet_solutions.cetia4.controller.support
Class ErrorServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.acsinet_solutions.cetia4.controller.support.ErrorServlet
All Implemented Interfaces:
AttributeKeys, ControllerConstants, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class ErrorServlet
extends javax.servlet.http.HttpServlet
implements ControllerConstants

Simple servlet that redirects to an error page in web environments. This servlet should be mapped as /error in /WEB-INF/web.xml

Author:
Santiago Arriaga
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.acsinet_solutions.cetia4.controller.ControllerConstants
_METHOD_PARAM, _PAGE_PARAM, _ROOT_PARAM, DEFAULT_VIEW, ERROR_URL, ERROR_VIEW, LOAD_CANCEL, LOAD_CURRENT, LOAD_DEFAULT, LOAD_ERROR, LOAD_PREVIOUS
 
Fields inherited from interface com.acsinet_solutions.cetia4.controller.AttributeKeys
_BUNDLE_KEY, _CONFIGURATION_KEY, _DEFAULT_CONTROLLER_KEY, _FORM_ACTION_KEY, _FORM_ATTRIBUTE_KEY, _LOCALE_KEY, _MESSAGE_KEY, _NAVIGATION_FLOW_KEY, _PORTAL_PATH_KEY, _RENDER_PARAMETERS_KEY, _SERVICE_LOCATOR_KEY, _SESSION_KEY, _SYSTEM_EXCEPTION_KEY, _VALIDATION_EXCEPTION_KEY
 
Constructor Summary
ErrorServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Forward the request to the error page.
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorServlet

public ErrorServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Forward the request to the error page. The generic error page is found under /WEB-INF/html/error.jsp unless th default views path and extensions were configured, and should be created for the project if this class is found.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
ControllerTools#getWebViewsPath(), ServletConfigurationImpl#WEB_VIEWS_PATH, ControllerTools#getWebDefaultExtension(), ServletConfigurationImpl#WEB_DEFAULT_EXTENSION