Share

Java Unified Expression Language

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Creating a JSP tag using JUEL

You are viewing a single message from this topic. View all messages.

  1. 2007-10-05 00:53:07 UTC
    I'm trying to create a simple JSP tag that will let me use JUEL expressions (specifically, method calls) in any container. The idea is something like this:

    <juel:set var="foo" value="${bar.method(blah)}" />

    Short of using JUEL as the EL for Tomcat (something I can't change), this seems like a straightforward and useful way of getting Velocity-style method calls into JSP pages.

    Unfortunately I'm having trouble seeing how to tackle the problem. In particular, how do I get the JUEL engine to do variable resolution using the JSP context? Two approaches come to mind:

    * Extend SimpleContext and have it return Tomcat's VariableMapper. Will that even work?
    * Extend SimpleContext and implement my own VariableMapper. Resolve requests using the pagecontext and wrap them in ObjectValueExpressions.

    Do either of those approaches sound like the right idea? Are there other issues? A little conceptual assistance would save me a lot of trial-and-error.

    Thanks,
    Jeff
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.