|
From: <jue...@we...> - 2004-03-03 08:29:09
|
+1 - sounds reasonable to me! =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Darren Davison Gesendet: Mi 03.03.2004 02:51 An: spr...@li... Betreff: [Springframework-developer] VelocityView -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any reason that all of the VelocityView.mergeTemplate(...) = method can't be replaced with: template.merge(context, response.getWriter()); Certainly works well here from what I've been able to see, but I'm not entirely sure of the implications. In particular I don't understand why the VelocityServlet (which this code in mergeTemplate is from) authors chose to do it the way they did. Perhaps it's legacy code that's just never been revisited, or there's some enormous performance benefit from modifying the output buffer size or using VelocityWriter..? Also, in VelocityEngineUtils.mergeTemplate(...) a new VelocityContext is created from the model Map without verifying that model names are = Velocity compliant (no periods(.)). VelocityView does this. Suggest moving the relevant method from VelocityView to VelocityEngineUtils, making it = static and having both classes call it. I've already got these changes locally so can commit them if there's no objection. There's no impact on API, the existing test suite continues = to pass and I've checked a couple of existing Velocity projects with it. Regards, - -- Darren Davison Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFARTo/KLMLAN01aw0RArI1AKCh6KkQEUtmDSbd+H6YRZ7IrDoRAwCdGuwj wLF4sHO27a+97tJyroyXc3I=3D =3D3jy4 -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |