DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17151>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17151 VelocityLayoutServlet assumes that $layout will be a String Summary: VelocityLayoutServlet assumes that $layout will be a String Product: Velocity Version: 1.3-rc1 Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Source AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This means that if the designer puts a non-string into the context under the name "layout" then the servlet will throw a ClassCastException (which hides the real error - an incorrect object in the context) My preference would be to use a toString on the object (if it exists). If there is an accidental object in the context named "layout", the servlet will print a moderately useful message ('Can't load template "layout/java.util.AbstractList$Itr@11121f6"'), and fall back to the standard layout (You could instead check the type of the context object, but that would require that $layout had to be a String, and it's probably more useful to just require that toString() returns something useful.) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
