Posts Tagged “EL”

Expression Language, Tags and You

One of the things I've seen on many projects which makes code a lot more difficult to read and understand is scriptlet (aka Java inside JSPs). Especially now, there really isn't a good reason you need to ever use scriptlet inside your JSPs, but especially given the prevalence within CQ's codebase it's a common practice. ## Helpful tools Recently, myself and others have been contributing code to make it easier to develop JSPs in CQ...

My CQ JSTL/EL Best Practises

In my last article My CQ JSP Development Best Practises we solely talked about JSP related issues, one of which was the use of JSTL/EL.  Not having a reasonable approach for dealing with JSTL/EL can land you in just as much trouble as a poorly constructed JSP.  These practises should help. Variables and MethodsComparison OperatorsTagfiles vs. Classic TagsScoped variables 1) Variable and MethodsThere are two operators to address JavaBean attribute's (getXXX), List and Map values, and scoped variables....

EL Function Management

In my post Tagfile vs. Tag in a Sling or CQ5 Application we created the groundwork for developing Servlet artifacts: Tag files, Classic Tags, and EL Functions.  The definition of all these items require the file taglib.tld.  This defines the URL that identifies the library via the uri in a <%@taglib prefix=".." uri=".." %> JSP statement within a JSP.  Here we address creating EL functions and managing them.Additionally, I will provide some of my thoughts...