Re: [OT] RE: How to get the tag name from within a taglib class ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Cris, On 9/15/20 13:18, Berneburg, Cris J. - US wrote: > CS> IMO, the JSP effort was a stepping-stone on a path to better > CS> technologies like Velocity, FreeMarker, and others. If I were > CS> king, JSP would just go away. Just my POV of course [...] > > cjb> what do you like better about Velocity, FreeMarker, etc. cjb> > more than JSP? > > CS> I started using Velocity years ago [...] It definitely has its > CS> warts but it's relatively actively maintained, and anything I > CS> need I can get in and do myself, submit patches, etc. CS> CS> > Advantages over JSP (IMHO): CS> CS> - Can't execute direct Java > code, ever CS> - Non-verbose syntax CS> - No limit on template > length [...] CS> - Easy to install POJO "tools" which just expose > Java objects CS> to the runtime so you can $tool.doSomething() > [...] CS> - Can load templates from anywhere (disk, DB, URL, etc.) > > Good to know! I also see that it is an ASF project. > > Is Velocity interpreted or compiled like JSP? I'm thinking of > performance impacts, like during loops. > > Answering my own question, the Velocity FAQ says, "Velocity > doesn't compile your templates. They are parsed into an AST > (abstract syntax tree) and that is what gets cached." Right. It's not really interpreted OR compiled. But it's not re-parsed on every request unless you configure it to do that. I've never had any performance complaints myself. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl9ip94ACgkQHPApP6U8 pFhooxAAifqd19yhLdxBAdDJY1ttX0CWB3/F3PUZ0qf6NoHU/kN7tLi5oejQpJ2a YTeml+vO/jI/c6sF5A/6rPdKyx6rjiUercUFP6efMJH6z4zVitgGfshWiAwWiBur SkDGtWsFUnco1fFOcSB2mD42amOl6JVEmpUyjMdlBw3wxjUY+fofKLD5/H1u2gb0 IqBmpZr7gPnhOK03Iti2zdaUCAf+iAJ+rgjnuo/iXpDRIa2s3JFxdbY0192id5sv bMPzO4hwU7aaR7qARXY+LBMFrJyuh2ICfIaz9s5uR+S20fSipcGkVSDl9OqATEls pHM/ff8d7fLuozj6JgVR1jDfQLOHEYwMktgJ9I1Lst4C+FaHsWoShm0mailYxHf6 FvF/XCaCxQ1mgwslnbfXBV65tU6okOMnkmZDCG8otxT/KMyhTgtSyfj80ft2x4Tq 0IvPWm8ztwj3Tr/P7Vg2T4RX46ESHQ20i0CtcGtMaaWRlVdTcBRYSR/JRsa+Hrdq W0SJ2PTO7stjuPDYTSog/wrprwS2QwKrpkj7RVgVXsOUShHTV9aswIWZjW+jiJyA 3DlsmBMeXhLdrlMTw8i1/fvHa+TtPjHoFvSH6sAHs3xX+QbLV3+bJ6/Z3+BU0V3N H76kobuPTXwEZXJ4y5TgY4Q8Jj/NQDwbnL+Si1Ut+gCpNlaD+B8= =O8Ce -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] RE: How to get the tag name from within a taglib class ?
Thanks Chris! CS> IMO, the JSP effort was a stepping-stone on a path to better CS> technologies like Velocity, FreeMarker, and others. If I were CS> king, JSP would just go away. Just my POV of course [...] cjb> what do you like better about Velocity, FreeMarker, etc. cjb> more than JSP? CS> I started using Velocity years ago [...] It definitely has its CS> warts but it's relatively actively maintained, and anything I CS> need I can get in and do myself, submit patches, etc. CS> CS> Advantages over JSP (IMHO): CS> CS> - Can't execute direct Java code, ever CS> - Non-verbose syntax CS> - No limit on template length [...] CS> - Easy to install POJO "tools" which just expose Java objects CS> to the runtime so you can $tool.doSomething() [...] CS> - Can load templates from anywhere (disk, DB, URL, etc.) Good to know! I also see that it is an ASF project. Is Velocity interpreted or compiled like JSP? I'm thinking of performance impacts, like during loops. Answering my own question, the Velocity FAQ says, "Velocity doesn't compile your templates. They are parsed into an AST (abstract syntax tree) and that is what gets cached." -- Cris Berneburg CACI Senior Software Engineer This electronic message contains information from CACI International Inc or subsidiary companies, which may be company sensitive, proprietary, privileged or otherwise protected from disclosure. The information is intended to be used solely by the recipient(s) named above. If you are not an intended recipient, be aware that any review, disclosure, copying, distribution or use of this transmission or its contents is prohibited. If you have received this transmission in error, please notify the sender immediately.
Re: [OT] RE: How to get the tag name from within a taglib class ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Cris, On 9/14/20 15:04, Berneburg, Cris J. - US wrote: > Hey Chris > > CS> IMO, the JSP effort was a stepping-stone on a path to better > CS> technologies like Velocity, FreeMarker, and others. If I were > CS> king, JSP would just go away. Just my POV of course, you are > CS> welcome to fall in love with JSP. :) > > Seeing as I am ever on the trailing edge of learning new or even > dated technologies, what do you like better about Velocity, > FreeMarker, etc. more than JSP? I started using Velocity years ago because it was bundled with Turbine which was being used by a project I got pulled-into. We eventually ripped everything else out, but Velocity survived. I looked at FreeMarker when doing a book review for Apache Struts 2 and it looked very interesting, but I discovered that the guy running the project was ... difficult to work with. SO I've stuck with Velocity for a long time. It definitely has its warts but it's relatively actively maintained, and anything I need I can get in and do myself, submit patches, etc. Advantages over JSP (IMHO): - - Can't execute direct Java code, ever - - Non-verbose syntax - - No limit on template length (JSP eventually hits the "Method too long" problem which is very inconvenient) - - Easy to install POJO "tools" which just expose Java objects to the runtime so you can $tool.doSomething() and it'll do whatever that is, converting the result to a String and dropping it into the output - - Can load templates from anywhere (disk, DB, URL, etc.) - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl9gyksACgkQHPApP6U8 pFi2og//TI//2oxfo4iE3q0B1f4sMN8fT8K9EVT89EME1jfUHontVRXtrX+tke2f t/3Os9veBJROAO5jOJvBCkefq7V2Lqij2289Vc7qVuuap+UqO/a+UCyOjxmVAHGh TrMeuxRLV8V1GPhDo0pftoJEWXg6SnDEqo7TF/1kGAmcaHEkWUEYrOPLfE92GbHJ 8bNySZFEleXX3decZj1mBdAoL+SMV7jbSvONGrMDds0saAddUmYMpdP9VPnCnKfG YS5Ec1Hx/1hshUisC1qOuarNCXH+84MLV98yM1pECoYCzx+2rTZ9RdoLwDnHjJB2 wJrc66P0yHOXyBfMamfpaxsUvTj2PON6RwBcbC7gaDMLIefGWM8TUROXMf7Odd40 TDZ+uJvyZBApeCnHkKrY/ipEvT4qb5sF0pVZTV9N6EBfqhKwBXgNqxTpCnAOkYFq egXYO1JGShxCdnHfAgNHyMoZ61PLltwe5msW6ZTlAqex3teZkmIrVfXXINy/JEbs lcRxe/V1EPBk9JxPJMy+hgDx4RBk6/ocepJbT2BR8nA9R1LBvA5h7wMr9iQw091S pbBr7xuKnIncMuCqTTyjiPZV/+7fBRYZgGAqZX+2pNGJkZ+kNMm3FAPqz9pjw/LD 2DZyK7gqXmFCWGGdlWxLfPOpNb6ajv3slc3fMXxvdBNNpW1AYg8= =AwcX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org