Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:55:31+00:00 2026-05-23T12:55:31+00:00

Here’s what I want to do: Map<String, Object> model = new Hashmap<String, Object>(); model.put(a,

  • 0

Here’s what I want to do:

Map<String, Object> model = new Hashmap<String, Object>();
model.put("a", "abc");
model.put("b", new Hashmap<String, Object>());
model.get("b").put("c", "xyz");
String el = "A is ${a} and C is ${b.c}";
assertEquals(elEval(el, model), "A is abc and C is xyz");

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:55:31+00:00Added an answer on May 23, 2026 at 12:55 pm

    Yes , it is possible , you can refer to this link for more information . As you can see , in order to use the EL expression standalone , you would have to implement several classes such as the javax.el.ELContext . I found JUEL , which is one of the implementation of the EL expression , already provides very nice implementations of these classes in the de.odysseus.el.util package.

    I have played around with JUEL .Here is my testing code for your reference:

    /*
    ExpressionFactoryImpl should be the implementation of ExpressionFactory used by  your application server. 
    For example , in tomcat 7.0 , it is org.apache.el.ExpressionFactoryImpl , which is inside the jasper-el.jar .
    jasper-el.jar  is the implemenation of EL expression provided by tomcat  , el-api.jar is the API of EL expression (i.e. JSR-245)
    */
    ExpressionFactory factory = new ExpressionFactoryImpl();
    
    /*
    SimpleContext is the utility classes from fuel 
    */
    SimpleContext context = new SimpleContext();    
    
    //Set the variables in the context  
    Map<String,Object> hashMap =  new HashMap<String,Object>();
    hashMap.put("c", "xyz");
    context.setVariable("a", factory.createValueExpression("abc", String.class));   
    context.setVariable("b", factory.createValueExpression(hashMap, HashMap.class));    
    
    //Create the EL expression 
    ValueExpression expr = factory.createValueExpression(context,  "A is ${a} and C is ${b.c}", String.class);  
    System.out.println(expr.getValue(context));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here's the code: #include <string> class Config { public: static const std::string asdf =
Here is a snippet of my JavaScript Code that I want to DRY up:
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here is my code, which takes two version identifiers in the form 1, 5,
Here's a coding problem for those that like this kind of thing. Let's see
Here is the scenario: I'm writing an app that will watch for any changes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.