This article covers a Bloomreach Experience Manager version 13. There's an updated version available that covers our most recent release.

Use Scoped Variables in JSP Templates and Tag files

The Unified Expression Language 3.0 adds support for referencing static fields and methods. "Supporting this feature in JSPs required changing the javax.servlet.jsp.el.ScopedAttributeELResolverimplementation so that it also checked identifiers to see if they were names of imported classes or fields" [1]

This has the effect that all unscoped variables which are undefined have a large performance drain. Especially tag files tend to have non-required attributes which will have this problem. The solution is to simply scope the variable in tag files and JSPs. Generally for variables coming from components this means adding requestScope. For tag file attributes you should add pageScope.






We recommend you always properly scope your variables to avoid this problem. Strictly speaking it may suffice to only treat your most used JSPs and tag files this way. However if you always scope your variables you can immediately dismiss this as an issue in case you do have performance problems.



Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close