Summary of error handling
Rod Widdowson
rdw at steadingsoftware.com
Tue Jun 10 08:44:22 EDT 2014
> I've only coded Velocity so far, since JSP views can always do anything
> Velocity can much more easily.
Another related question on the back of this is how are we handling HTML
encoding in Velocity.
Before I went on vacation I was looking at velocity and the taglibs. What
used to be done was an instance of the esapi encoder object was passed into
the request (called "encoder") and velocity used that object to do the HTML
encoding. The encoding methods are now static and that broke a few error
pages. I fixed jsp (easy); I'm sure that there is a way to call static
methods in Velocity but I couldn't see how and so I supressed the encoding
in the velocity pages with a mental note to go back to this..
But of course things have moved on, but AFAICS we are still injecting
something to the request, but the velocity pages are not calling any HTML
encoding.
We may not need to encode for the error pages, but I'm pretty sure that we
need to for stuff which comes in from the metadata.
As always there are lots of ways to do this, but which way is the best.
/R
More information about the dev
mailing list