• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Evaluating EL twice

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people. I joined a project where EL-expressions are readed from XML files. So I need to find a way to evaluate an EL-expression twice. For example, let suppose that this is readed from a XML and saved in a String variable x:In my jsp, I need to do something like this (I know that currently this is illegal):That application is not mine, and I am refactoring it. However I can't do whatever I want, and specifically I can't drop nor change the behavior of the feature of reading EL from XML files. In the actual code, this problem is solved with very ugly and hackish scriptlets and taglibs with code like this:My objective is to eliminate such scriptlets and minimize the use of such taglibs. So, somebody knows a way to accomplish this? Is double EL evaluation possible? If not, what workarounds I could use that are not any worse than these scriptlets?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could create custom tags mirroring the standard taglib and do the additional eval there, or depending on how these are to be used to a layer of evaluation in the servlet/whatever-you're-using-on-the-backend do evaluation there before sending to the JSP.
 
Something must be done about this. Let's start by reading this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic