Java Reference
In-Depth Information
Figure 13.4: Error message for exceeding the upload size limit
DelegatingExceptionHandler
for
Multiple
Exception-Handling
Classes
Most of the time a single class that extends DefaultException-
Handler is a good way of centralizing your exception-handling
code in one place. Nevertheless, you're not out of luck if you
need more than one exception-handling class. Stripes includes
DelegatingExceptionHandler to do exactly that; see Section A.2 ,
ExceptionHandler.Class, on page 372 for more details.
13.2
Customizing URL Bindings
So far, we've been developing the webmail application, learning Stripes,
and adding features, without bothering much with URLs. That has
a nice feel to it—work with action bean class names, event handler
names, and parameter names, and let Stripes figure out all the URL
business.
That's all well and good, but you, your boss, your customer, or an
Unstoppable Force of Nature might decide that the URLs in your appli-
cation must be changed. Stripes, not being a dictator, lets you change
the default URL binding convention and adapt it to your requirements.
You can change anything you like, from a minor tweak in the con-
vention to completely replacing the default strategy with your own.
The ActionResolver interface defines several methods that Stripes uses
for URL binding. The default implementation, NameBasedActionResolver ,
contains protected methods that make it easy to customize different
parts of the binding convention.
 
 
 
 
Search WWH ::




Custom Search