• Post Reply Bookmark Topic Watch Topic
  • New Topic

Evaluating EL twice  RSS feed

 
Victor Williams Stafusa da Silva
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!