Java Reference
In-Depth Information
use whatever strategy that you like to determine the implementations
of all the modules used by Stripes. For example:
<init-param>
<param-name> Configuration.Class </param-name>
<param-value> stripesbook.nonext.MyConfiguration </param-value>
</init-param>
ExceptionHandler.Class
This is the ExceptionHandler implementation. The default is DefaultExcep-
tionHandler . An alternate implementation is also available, DelegatingEx-
ceptionHandler , which you can use with the following:
<init-param>
<param-name> ExceptionHandler.Class </param-name>
<param-value>
net.sourceforge.stripes.exception.DelegatingExceptionHandler
</param-value>
</init-param>
DelegatingExceptionHandler works much like DefaultExceptionHandler ex-
cept that you can use more than one exception-handling class. Each of
those classes must implement AutoExceptionHandler (a marker interface)
and implement methods with the same signature as exception-handling
methods in DefaultExceptionHandler :
public Resolution methodName(Type exceptionType,
HttpServletRequest request, HttpServletResponse response);
Returning a Resolution is optional; any other return type will be ignored.
DelegatingExceptionHandler discovers AutoExceptionHandler implementa-
tions via Extension.Packages , but you can also use DelegatingException-
Handler.Packages to specify different packages:
<init-param>
<param-name> DelegatingExceptionHandler.Packages </param-name>
<param-value> stripesbook.exception </param-value>
</init-param>
FormatterFactory.Class
This is the FormatterFactory implementation. A custom formatter factory
lets you control how Formatter instances are created and also allows
you to register custom formatters outside the extension packages. For
example:
<init-param>
<param-name> FormatterFactory.Class </param-name>
<param-value> stripesbook.nonext.MyFormatterFactory </param-value>
</init-param>
 
 
Search WWH ::




Custom Search