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.

not sure what that has to do with the VVS.  it uses
Velocity.setExtendProperties(ExtendedProperties)

>  > 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.

ExtendedProperties.convertProperties() would be a far more appropriate
place.

> 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.

that would be something to take up with Velocity proper.  the VVS might
legitimately log VVS-specific properties were there any (see the
VelocityLayoutServlet), but not the rest i think.

it seems you're pulling this discussion towards issues concerning core
Velocity.  and that's fine, but it would probably be better to start a new
thread for that.

Nathan Bubna
[EMAIL PROTECTED]


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

Reply via email to