Hello,

Nathan Bubna wrote:
Bill said:
...

Although the ExtendedProperties class is used internally,
VelocityServlet loads the properties itself by calling:
      p.load( new FileInputStream(propsFile) );

where "p" is a Properties object and then passes that object to
Velocity.init(p).  The propertise are then set into an
ExtendedProperties object.  So it would be possible for to iterate
through the properties and trim whitespace.


iterate through and trim? ugh.

ideally this sort of thing really doesn't belong in a servlet's code.

Maybe, but Velocity.init(Properties) takes the object and doesn't care how or where it came from.


> it
would be awfully hackish.  if the proper behavior is to trim all the
properties, then the VelocityViewServlet isn't the place to do the trimming.

But since you're merging VelocityServlet into VelocityViewServlet, there isn't any other place whitespace could be trimmed assuming it should be done.


It could be argued there's a bug in Properties.load. Maybe not.

Another option is just to provide better logging to show what properties have been loaded. Then if there are an extra space, etc. it could be caught easily enough.

-Bill


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to