com.iplanet.jato
Class NavigationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.iplanet.jato.util.WrapperRuntimeException
                          |
                          +--com.iplanet.jato.NavigationException
All Implemented Interfaces:
RootCauseException, java.io.Serializable

public class NavigationException
extends WrapperRuntimeException

This exception is thrown to indicate that an exception occurred during navigation to another resource handled by the container. It is most typically thrown by the following methods:

	ViewBean.forward(...)
	ViewBean.include(...)
	ViewBean.forwardTo()
	ViewBean.forwardTo(...)
 
When thrown by these methods, the exception indicates that either a java.io.IOException or javax.servlet.ServletException occurred during a call to RequestDispatcher.forward(...) or RequestDispatcher.include(...). In short, this exception is used to wrap the standard exceptions that can occur during these operations so that application code need not declare them in method signatures. This represents a significant advantage to application code that wants to perform navigation but needs to do so several levels down in the call stack.

When a NavigationException is thrown and propagates up to the module servlet, the servlet unwraps and throws the root cause exception instead of the NavigationException if it is one of the two types noted above.

In general, developers should not need to use this class unless they are designing their own navigation mechanisms and want to take advantage of the module servlet's automatic unwrapping feature.

Version:
JATO/1.2.2 $Id: NavigationException.java,v 1.8 2002/03/16 03:26:28 todd Exp $
See Also:
ViewBean.forward(String, ViewBean, RequestContext), ViewBean.include(String, ViewBean, RequestContext), ViewBean.forwardTo(RequestContext), ViewBeanBase.forwardTo(), Serialized Form

Constructor Summary
NavigationException()
          Default constructor
NavigationException(java.lang.String message)
          Create an instance with the specified error message
NavigationException(java.lang.String message, java.lang.String targetResource, ViewBean targetViewBean, java.lang.Throwable rootCause)
          Create an instance with the specified error message, root cause exception, target resource, and target ViewBean
NavigationException(java.lang.String message, java.lang.Throwable rootCause)
          Create an instance with the specified error message and root cause exception
NavigationException(java.lang.Throwable rootCause)
          Create an instance with the specified root cause exception
 
Method Summary
 java.lang.String getTargetResource()
          Return the target resource URL
 ViewBean getTargetViewBean()
          Return the target ViewBean
 
Methods inherited from class com.iplanet.jato.util.WrapperRuntimeException
getException, getRootCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavigationException

public NavigationException()
Default constructor

NavigationException

public NavigationException(java.lang.String message)
Create an instance with the specified error message

NavigationException

public NavigationException(java.lang.Throwable rootCause)
Create an instance with the specified root cause exception

NavigationException

public NavigationException(java.lang.String message,
                           java.lang.Throwable rootCause)
Create an instance with the specified error message and root cause exception

NavigationException

public NavigationException(java.lang.String message,
                           java.lang.String targetResource,
                           ViewBean targetViewBean,
                           java.lang.Throwable rootCause)
Create an instance with the specified error message, root cause exception, target resource, and target ViewBean
Method Detail

getTargetResource

public java.lang.String getTargetResource()
Return the target resource URL

getTargetViewBean

public ViewBean getTargetViewBean()
Return the target ViewBean