Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using JSTL EL in my own custom tags  RSS feed

 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone else ever tried to incorporate JSTL-EL support in their own custom tags. I (mostly) love the simpler, XML-friendly EL syntax and would really like to use it in my own custom tags, so they can work nicely with JSTL.
Some documents I have found seem to imply that you can do this, but I haven't yet found out exactly how to do it. Anyone ?
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep - you just get a reference to the expression language parser and let it parse the expression for you. There's an example in the code download for my book, although it was written using an early access version. Let me see if I can dig out a more recent version...
The only thing about doing this is that it makes your tags dependent on the JSTL implementation that you use (probably not a big issue). Of course, JSP 2.0 provides the EL automatically which will be nice.
Simon
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!