Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
1.4
-
None
-
None
-
Operating System: All
Platform: All
-
32033
Description
My servlet extends VelocityServlet and returns a valid template reference in
the handler. The template references a method which does some DB access. If I
turn off the DB and run the app, I have two issues:
1/ I don't get the exception. I can work around this by providing my own error
() handler to deal with it, work out whether the exception has been logged etc
and return some error HTML. Messy but hey, Velocity is free.
2/ Oh dear. It seems the template merging flushes out what it has processed so
far before re-throwing the exception. I dont want this. If an error occurs
during parsing, I want the user to see an error message, not half a template !!
Hope I haven't missed anything obvious, but how do I do this ?
NOTE
I quite like Velocity and managed to integrate my own Logger (although it would
have been easier if the authors had used the Apache commons Logging stuff).
This is better than FreeMarker.