com.iplanet.jato
Class ApplicationServletBase

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.iplanet.jato.ApplicationServletBase
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ApplicationServletBase
extends javax.servlet.http.HttpServlet

The core JATO request handling infrastructure. This class forms the core implementation of JATO's request handling and dispatch mechanism, and includes hooks for customizing this behavior. This servlet is not invoked directly in a JATO application. Instead, developers must derive their module-specifc servlets (called module servlets) from this class. These module servlets will then customize the request handling behavior of this class by overriding the appropriate hook or event handler methods.

Version:
JATO/1.2.2 $Id: ApplicationServletBase.java,v 1.71 2002/03/16 03:26:27 todd Exp $
See Also:
Serialized Form

Field Summary
static java.lang.String APPLICATION_ERROR_MESSAGE_I18N
           
static java.lang.String DEVELOPER_EVENT_OVERRIDE_HELP_MESSAGE_I18N
           
static java.lang.String MESSAGE_AREA_POSTFIX
           
static java.lang.String MESSAGE_AREA_PREFIX
           
static java.lang.String PARAM_DEBUG
           
static java.lang.String PARAM_HANDLER_BEAN
           
static java.lang.String REQUEST_CONTEXT_ATTRIBUTE_NAME
           
static java.lang.String RESERVED_PARAMETER_NAME_PREFIX
           
static java.lang.String SHOW_MESSAGE_BUFFER_ATTRIBUTE_NAME
           
 
Constructor Summary
ApplicationServletBase()
          Default constructor
 
Method Summary
protected  void addResponseHeaders(RequestContext requestContext)
          Adds HTTP headers to the response.
protected  RequestContext createRequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Factory method that creates the request context used for the current request.
protected  void dispatchRequest(ViewBean viewBean, RequestContext requestContext)
          Dispatches the request to the provided view bean
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          The main entry point for HTTP GET requests.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          The main entry point for HTTP POST requests.
protected  void fireAfterRequestEvent(RequestContext requestContext)
          Fire the onAfterRequest event
protected  void fireBeforeRequestEvent(RequestContext requestContext)
          Fire the onBeforeRequest event
protected  void fireInitializeHandlerEvent(RequestContext requestContext, RequestHandler requestHandler)
          Fire the onInitializeHandler event
protected  void fireNewSessionEvent(RequestContext requestContext)
          Fire the onNewSession event
protected  void fireRequestHandlerNotFoundEvent(RequestContext requestContext, java.lang.String handlerName)
          Fire the onRequestHandlerNotFound event
protected  void fireRequestHandlerNotSpecifiedEvent(RequestContext requestContext)
          Fire the onRequestHandlerNotSpecified event
protected  void fireSessionEvents(RequestContext requestContext)
           
protected  void fireSessionTimeoutEvent(RequestContext requestContext)
          Fire the onSessionTimeout event
protected  void fireUncaughtException(RequestContext requestContext, java.lang.Exception e)
          Fire the onUncaughtException event
protected  java.lang.String getDefaultHandlerName(javax.servlet.http.HttpServletRequest request)
          Invoked when a handler name is not specified in the request.
protected  java.lang.String getLocalizedMessage(java.lang.String key)
          Defensive accessor method for localized messages.
 java.lang.String getModuleURL()
          Return the module URL for this servlet
static java.lang.String getModuleURL(RequestContext context, java.lang.Class classInModule)
          Returns the module URL for the specified class in that module
static java.lang.String getModuleURLParameterName(java.lang.String className)
          Returns the name of the module URL servlet context parameter for a given class
static java.lang.String getPackageName(java.lang.String className)
          Returns the package name from the specified class name
 java.lang.String getServletName()
          Return the servlet name specified in the ServletConfig
protected  ViewBean getViewBeanInstance(java.lang.String pageName, RequestContext requestContext)
          Helper method to assist in obtaining the ViewBean for the specified page name.
 void init(javax.servlet.ServletConfig config)
          Servlet initialization method
protected  void initializeRequestContext(RequestContext requestContext)
          Subclasses should override this method to further initialize the request context as needed.
 boolean isDebug()
          Return the state of debug mode.
protected  boolean isNewSession(RequestContext requestContext)
          Returns the "new" status of the current session
protected  boolean isSessionTimedOut(RequestContext requestContext, java.lang.String requestedSessionID)
          Returns the timeout status of the current session
 boolean isShowMessageBuffer()
          Return whether or not the application message buffer will be appended to the rendered HTML page.
 void notifyRequestCompletionListeners(RequestContext requestContext)
          Notifies the request completion listeners associated with the request context that the request is complete.
protected  void onAfterRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been superceded by onAfterRequest(RequestContext requestContext)
protected  void onAfterRequest(RequestContext requestContext)
          Override this method to perform actions after the request has been handled and a response page rendered.
protected  void onBeforeHeader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been removed. Migrate all code in this event to the onInitializeHandler() method.
protected  void onBeforeRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been superceded by onBeforeRequest(RequestContext requestContext)
protected  void onBeforeRequest(RequestContext requestContext)
          Override this method to perform actions before the request is dispatched to the ViewBean handler, such as checking security or logging debug information.
protected  void onBeforeSessionUpdate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been removed. Migrate all code in this event to the onAfterRequest() method.
protected  void onInitializeHandler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ViewBean viewBean)
          Deprecated. This event has been superceded by onInitializeHandler(RequestContext requestContext, RequestHandler requestHandler)
protected  void onInitializeHandler(RequestContext requestContext, RequestHandler requestHandler)
          Override this method to perform common of the ViewBean being invoked on this request.
protected  void onInitializeHandler(RequestContext requestContext, ViewBean viewBean)
          Deprecated. This event has been superceded by onInitializeHandler(RequestContext requestContext, RequestHandler requestHandler)
protected  void onNewSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been superceded by onNewSession(RequestContext requestContext)
protected  void onNewSession(RequestContext requestContext)
          Override this method to receive notification of a new session (a new user has requested a page)
protected  void onRequestHandlerNotFound(RequestContext requestContext, java.lang.String handlerName)
          Override this method to receive notification that a request was received that specified an invalid target request handler (page).
protected  void onRequestHandlerNotSpecified(RequestContext requestContext)
          Override this method to receive notification that a request was received that did not specify a target request handler (page).
protected  void onSessionTimeout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This event has been superceded by onSessionTimeout(RequestContext requestContext)
protected  void onSessionTimeout(RequestContext requestContext)
          Override this method to receive notification that a request was submitted with an exprired session.
protected  void onUncaughtException(RequestContext requestContext, java.lang.Exception e)
          Override this method to respond to uncaught application error messages.
protected  void outputDebug(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Appends a snoop-style table of diagnostic information to the bottom of the rendered HTML page.
protected  void outputServletErrorMessage(RequestContext requestContext, int statusCode, java.lang.String message, java.lang.String detail, java.lang.Throwable e)
           
protected  java.lang.String parsePathInfo(java.lang.String pathInfo)
          Returns the logical page name specified on the request URL
protected  java.lang.String prepareEventOverrideMessage(java.lang.String eventMethodName)
          Prepares a localized version of the "developer friendly" event override error message
protected  java.lang.String prepareServletErrorMessage(java.lang.String message, java.lang.String detail, java.io.StringWriter stringWriter)
          Prepares a localized version of the "developer friendly" servlet error message
protected  void processRequest(java.lang.String pageName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method contains the main implementation of JATO's request handling and dispatch mechanism
 void setDebug(boolean value)
          Set the state of debug mode.
 void setDefaultHandlerName(java.lang.String value)
          Sets the default handler name to be used when a handler name isn't specified in the request
 void setModuleURL(java.lang.String value)
          Set the module URL for this servlet
protected  void setProperty(javax.servlet.ServletConfig config, java.lang.String fullPropertyName, java.lang.Object propertyValue)
          Sets the specified property on the servlet instance
 void setShowMessageBuffer(boolean value)
          Set whether or not the application message buffer will be appended to the rendered HTML page.
protected  boolean showMissingModuleURLWarning()
          For internal use only.
protected  void showMissingModuleURLWarning(boolean value)
          For internal use only.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESERVED_PARAMETER_NAME_PREFIX

public static final java.lang.String RESERVED_PARAMETER_NAME_PREFIX

REQUEST_CONTEXT_ATTRIBUTE_NAME

public static final java.lang.String REQUEST_CONTEXT_ATTRIBUTE_NAME

PARAM_DEBUG

public static final java.lang.String PARAM_DEBUG

PARAM_HANDLER_BEAN

public static final java.lang.String PARAM_HANDLER_BEAN

MESSAGE_AREA_PREFIX

public static final java.lang.String MESSAGE_AREA_PREFIX

MESSAGE_AREA_POSTFIX

public static final java.lang.String MESSAGE_AREA_POSTFIX

SHOW_MESSAGE_BUFFER_ATTRIBUTE_NAME

public static final java.lang.String SHOW_MESSAGE_BUFFER_ATTRIBUTE_NAME

APPLICATION_ERROR_MESSAGE_I18N

public static final java.lang.String APPLICATION_ERROR_MESSAGE_I18N

DEVELOPER_EVENT_OVERRIDE_HELP_MESSAGE_I18N

public static final java.lang.String DEVELOPER_EVENT_OVERRIDE_HELP_MESSAGE_I18N
Constructor Detail

ApplicationServletBase

public ApplicationServletBase()
Default constructor
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Servlet initialization method
Overrides:
init in class javax.servlet.GenericServlet

setProperty

protected void setProperty(javax.servlet.ServletConfig config,
                           java.lang.String fullPropertyName,
                           java.lang.Object propertyValue)
                    throws java.beans.IntrospectionException
Sets the specified property on the servlet instance

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
The main entry point for HTTP GET requests. This method simply delegates to the doPost() method, as there is no difference between a GET and POST invocation in a JATO application.
Overrides:
doGet in class javax.servlet.http.HttpServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
The main entry point for HTTP POST requests. This method is also the main entry point for all JATO requests, and is delegated to by the doGet() method.
Overrides:
doPost in class javax.servlet.http.HttpServlet

parsePathInfo

protected java.lang.String parsePathInfo(java.lang.String pathInfo)
Returns the logical page name specified on the request URL
Returns:
The logical page name

processRequest

protected void processRequest(java.lang.String pageName,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This method contains the main implementation of JATO's request handling and dispatch mechanism

getDefaultHandlerName

protected java.lang.String getDefaultHandlerName(javax.servlet.http.HttpServletRequest request)
Invoked when a handler name is not specified in the request. This method returns the default handler name specified via the setDefaultHandlerName(...) method, or null (the default). If the returned value is null, the servlet will throw an exception indicating that there was no specified handler.

You may override this method in subclasses to provide the default handler name when an invocation is not present in the request. This value could be a default start page or an error page.

Parameters:
request - The servlet request object. Implementors of this method can use the request to gather any information they require in order to determine the proper handler name.

setDefaultHandlerName

public void setDefaultHandlerName(java.lang.String value)
Sets the default handler name to be used when a handler name isn't specified in the request
Parameters:
value - The new handler name. This is the logical name of the handler, not a class name.

addResponseHeaders

protected void addResponseHeaders(RequestContext requestContext)
Adds HTTP headers to the response. The current implementation adds headers to prevent HTTP proxies from caching the returned HTML. Developers can override this method to return additional HTTP headers.
Parameters:
requestContext - The request context for the current request

createRequestContext

protected RequestContext createRequestContext(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
Factory method that creates the request context used for the current request. Developers can override this method to return a custom implementation of RequestContext of desired.
Parameters:
request - The current request's request object
response - The current request's response object

initializeRequestContext

protected void initializeRequestContext(RequestContext requestContext)
Subclasses should override this method to further initialize the request context as needed. Overriding implementations should always call the super version of this method.
Parameters:
requestContext - The request context for the current request

notifyRequestCompletionListeners

public void notifyRequestCompletionListeners(RequestContext requestContext)
Notifies the request completion listeners associated with the request context that the request is complete.
Parameters:
requestContext - The request context for the current request

fireSessionEvents

protected void fireSessionEvents(RequestContext requestContext)
                          throws javax.servlet.ServletException

isNewSession

protected boolean isNewSession(RequestContext requestContext)
Returns the "new" status of the current session
Parameters:
requestContext - The current request's RequestContext object
Returns:
True if the current session is judged to be newly created and a new session event should be fired

isSessionTimedOut

protected boolean isSessionTimedOut(RequestContext requestContext,
                                    java.lang.String requestedSessionID)
Returns the timeout status of the current session
Parameters:
requestContext - The current request's RequestContext object
requestedSessionID - The requested session ID to check for timeout. The reason this value is passed to this method is because of a bug in Tomcat and potentially other containers that causes the HttpServletRequest.getRequestedSessionId() method to return the session ID of a newly created session instead of the actual request session ID from the request. The value passed in this parameter is obtained before the session is created or any session-related events are fired, thereby hopefully avoiding this bug.
Returns:
True if the current session has timed out and a session timeout event should be fired

getViewBeanInstance

protected ViewBean getViewBeanInstance(java.lang.String pageName,
                                       RequestContext requestContext)
                                throws javax.servlet.ServletException
Helper method to assist in obtaining the ViewBean for the specified page name. This method also fires the initializeHandler() event for the returned ViewBean, or the requestHandlerNotFound() event if the ViewBean for the page is not found.

dispatchRequest

protected void dispatchRequest(ViewBean viewBean,
                               RequestContext requestContext)
                        throws java.lang.Exception
Dispatches the request to the provided view bean
Parameters:
viewBean - The view bean that will handle the request invocation via its invokeRequestHandler() method
requestContext - The request context for the current request

outputDebug

protected void outputDebug(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.io.IOException,
                           javax.servlet.ServletException
Appends a snoop-style table of diagnostic information to the bottom of the rendered HTML page. Note, not all J2EE containers will allow this information to be appended to the output stream.
Parameters:
request - The servlet request object for the current request
response - The servlet response object for the current request

outputServletErrorMessage

protected void outputServletErrorMessage(RequestContext requestContext,
                                         int statusCode,
                                         java.lang.String message,
                                         java.lang.String detail,
                                         java.lang.Throwable e)
                                  throws javax.servlet.ServletException

fireNewSessionEvent

protected void fireNewSessionEvent(RequestContext requestContext)
                            throws javax.servlet.ServletException
Fire the onNewSession event

fireSessionTimeoutEvent

protected void fireSessionTimeoutEvent(RequestContext requestContext)
                                throws javax.servlet.ServletException
Fire the onSessionTimeout event

fireBeforeRequestEvent

protected void fireBeforeRequestEvent(RequestContext requestContext)
                               throws javax.servlet.ServletException
Fire the onBeforeRequest event

fireRequestHandlerNotSpecifiedEvent

protected void fireRequestHandlerNotSpecifiedEvent(RequestContext requestContext)
                                            throws javax.servlet.ServletException
Fire the onRequestHandlerNotSpecified event

fireRequestHandlerNotFoundEvent

protected void fireRequestHandlerNotFoundEvent(RequestContext requestContext,
                                               java.lang.String handlerName)
                                        throws javax.servlet.ServletException
Fire the onRequestHandlerNotFound event

fireInitializeHandlerEvent

protected void fireInitializeHandlerEvent(RequestContext requestContext,
                                          RequestHandler requestHandler)
                                   throws javax.servlet.ServletException
Fire the onInitializeHandler event

fireAfterRequestEvent

protected final void fireAfterRequestEvent(RequestContext requestContext)
Fire the onAfterRequest event

fireUncaughtException

protected final void fireUncaughtException(RequestContext requestContext,
                                           java.lang.Exception e)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Fire the onUncaughtException event

onNewSession

protected void onNewSession(RequestContext requestContext)
                     throws javax.servlet.ServletException
Override this method to receive notification of a new session (a new user has requested a page)
Parameters:
requestContext - The request context for the current request

onSessionTimeout

protected void onSessionTimeout(RequestContext requestContext)
                         throws javax.servlet.ServletException
Override this method to receive notification that a request was submitted with an exprired session. The default implementation of this method invalidates the session and returns an error message. Developers who wish to replace this behavior with something more useful, such as loading an error or login page, should override this method and avoid calling the superclass version.

Note that the invalidation of the session by default means that regardless of how the user accesses the application after a session timeout, the request will result in a session timeout error. This is by design, and is intended to be as strict as possible. Without this protection, if the developer did not override the default event (as we reccommend), it would be possible for the user to receive a session timeout error, but then continue though the application on the next request. Although this may be desirable behavior in some cases, this is a dangerous default, so this method always invalidates the session to ensure that the user cannot perform unintended actions after timing out. One consequence of this ehavior is that, because of the way session is tracked across requests using cookies, the user will have to close the current browser to access the application again after a session timeout occurs. To avoid this behavior, the developer must override this event and avoid invalidating the session, as described above, while ensuring that not invalidating the session on a timeout cannot cause application inconsistencies.

Parameters:
requestContext - The request context for the current request

onBeforeRequest

protected void onBeforeRequest(RequestContext requestContext)
                        throws javax.servlet.ServletException
Override this method to perform actions before the request is dispatched to the ViewBean handler, such as checking security or logging debug information.
Parameters:
requestContext - The request context for the current request

onRequestHandlerNotSpecified

protected void onRequestHandlerNotSpecified(RequestContext requestContext)
                                     throws javax.servlet.ServletException
Override this method to receive notification that a request was received that did not specify a target request handler (page). The default implementation of this method is to throw an exception. Developers who wish to replace this behavior with something more useful, such as loading an error page, should override this method and ovoid calling the superclass version.
Parameters:
requestContext - The request context for the current request

onRequestHandlerNotFound

protected void onRequestHandlerNotFound(RequestContext requestContext,
                                        java.lang.String handlerName)
                                 throws javax.servlet.ServletException
Override this method to receive notification that a request was received that specified an invalid target request handler (page). The default implementation of this method is to throw an exception. Developers who wish to replace this behavior with something more useful, such as loading an error page, should override this method and ovoid calling the superclass version.
Parameters:
requestContext - The request context for the current request
handlerName - The request handler name

onInitializeHandler

protected void onInitializeHandler(RequestContext requestContext,
                                   RequestHandler requestHandler)
                            throws javax.servlet.ServletException
Override this method to perform common of the ViewBean being invoked on this request.
Parameters:
requestContext - The request context for the current request
requestHandler - The request handler for the current request

onAfterRequest

protected void onAfterRequest(RequestContext requestContext)
Override this method to perform actions after the request has been handled and a response page rendered. This event is the last chance to perform an action before the request is complete.
Parameters:
requestContext - The request context for the current request

onUncaughtException

protected void onUncaughtException(RequestContext requestContext,
                                   java.lang.Exception e)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Override this method to respond to uncaught application error messages. The default implementation of this method rethrows the exception if the response has already been committed. Otherwise, it response with an error message. Developers who wish to replace this behavior with something more useful, such as loading an application-specific error page, should override this method and avoid calling the superclass version.
Parameters:
requestContext - The request context for the current request
e - The uncaught exception

onNewSession

protected final void onNewSession(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws javax.servlet.ServletException
Deprecated. This event has been superceded by onNewSession(RequestContext requestContext)


onSessionTimeout

protected final void onSessionTimeout(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws javax.servlet.ServletException
Deprecated. This event has been superceded by onSessionTimeout(RequestContext requestContext)


onBeforeRequest

protected final void onBeforeRequest(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws javax.servlet.ServletException
Deprecated. This event has been superceded by onBeforeRequest(RequestContext requestContext)


onInitializeHandler

protected final void onInitializeHandler(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response,
                                         ViewBean viewBean)
Deprecated. This event has been superceded by onInitializeHandler(RequestContext requestContext, RequestHandler requestHandler)


onInitializeHandler

protected final void onInitializeHandler(RequestContext requestContext,
                                         ViewBean viewBean)
                                  throws javax.servlet.ServletException
Deprecated. This event has been superceded by onInitializeHandler(RequestContext requestContext, RequestHandler requestHandler)


onAfterRequest

protected final void onAfterRequest(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Deprecated. This event has been superceded by onAfterRequest(RequestContext requestContext)


onBeforeHeader

protected final void onBeforeHeader(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Deprecated. This event has been removed. Migrate all code in this event to the onInitializeHandler() method.


onBeforeSessionUpdate

protected final void onBeforeSessionUpdate(javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
Deprecated. This event has been removed. Migrate all code in this event to the onAfterRequest() method.


getServletName

public java.lang.String getServletName()
Return the servlet name specified in the ServletConfig
Overrides:
getServletName in class javax.servlet.GenericServlet

getModuleURL

public java.lang.String getModuleURL()
Return the module URL for this servlet

setModuleURL

public void setModuleURL(java.lang.String value)
Set the module URL for this servlet

isDebug

public boolean isDebug()
Return the state of debug mode. If debug mode is enabled, the servlet writes diagnostic information to the response output and the servlet context log.

setDebug

public void setDebug(boolean value)
Set the state of debug mode. If debug mode is enabled, the servlet writes diagnostic information to the response output and the servlet context log.

isShowMessageBuffer

public boolean isShowMessageBuffer()
Return whether or not the application message buffer will be appended to the rendered HTML page.

setShowMessageBuffer

public void setShowMessageBuffer(boolean value)
Set whether or not the application message buffer will be appended to the rendered HTML page.

showMissingModuleURLWarning

protected boolean showMissingModuleURLWarning()
For internal use only.

showMissingModuleURLWarning

protected void showMissingModuleURLWarning(boolean value)
For internal use only.

getPackageName

public static java.lang.String getPackageName(java.lang.String className)
Returns the package name from the specified class name

getModuleURLParameterName

public static java.lang.String getModuleURLParameterName(java.lang.String className)
Returns the name of the module URL servlet context parameter for a given class
Parameters:
className - The name of the class
Returns:
The module URL servlet context parameter

getModuleURL

public static java.lang.String getModuleURL(RequestContext context,
                                            java.lang.Class classInModule)
Returns the module URL for the specified class in that module
Parameters:
context - The request context for the current request
classInModule - A class in the desired module. This class is used to derive the module URL parameter name in the servlet context.

prepareServletErrorMessage

protected java.lang.String prepareServletErrorMessage(java.lang.String message,
                                                      java.lang.String detail,
                                                      java.io.StringWriter stringWriter)
Prepares a localized version of the "developer friendly" servlet error message
Parameters:
message - The basic error message
detail - The detailed error message
stringWriter - The stringWriter containing the stack trace
Returns:
The full message

prepareEventOverrideMessage

protected java.lang.String prepareEventOverrideMessage(java.lang.String eventMethodName)
Prepares a localized version of the "developer friendly" event override error message
Parameters:
eventMethodName - The event which developers should override
Returns:
The message

getLocalizedMessage

protected java.lang.String getLocalizedMessage(java.lang.String key)
Defensive accessor method for localized messages. Attempts to return localized message from resource bundel. If that fails, returns a hard coded message. If that fails, returns the constant message "[Missing message resource]".
Parameters:
key - The resource bundle key
Returns:
The localized message