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 7991889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:25:16+00:00 2026-06-04T13:25:16+00:00

The documentation says parameters are supported but the example uses hl and # which

  • 0

The documentation says parameters are supported but the example uses hl and # which are unknown to me where I use c: and $ instead of this which is from the docs:

<h:inputText value="#{userNumberBean.userNumber('5')}">

All I know about $ vs # in EL is that is has to do with rvalue and lvalue which I can need a further explanation when to use the # style. I’m looking for how an EL expression of typ $… can take a parameter and how to call non-getters non-setters with a parameter for example fetching a constant static string from a bean in the request context.

What does # do compared to $? How do I use parameters in EL if I want to use the $?
The scriptlets I want to migrate to EL are something like <%= Constants.CONSTANT %>and <%= object.method(parameter) %> that I want to do in EL.

  • 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-06-04T13:25:18+00:00Added an answer on June 4, 2026 at 1:25 pm

    The #{} syntax is supposed to be used in the Java EE’s MVC framework JSF only. See also Difference between JSP EL, JSF EL and Unified EL. Just stick to ${} syntax in old JSP.

    As to invoking methods with arguments, this is introduced in Servlet 3.0 / EL 2.2. WAS 8 is a Servlet 3.0 container, so it should support it out the box. You only need to make sure that your web.xml is declared conform Servlet 3.0 specification version. Otherwise the container will run in fallback modus matching the version indicated by web.xml. The proper Servlet 3.0 web.xml declaration look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        version="3.0">
    
        <!-- Config here. -->
    
    </web-app>
    

    This way the ${object.method(param)} must work.

    Referencing constants in EL is a different story. This will be introduced in the upcoming EL 3.0, which is part of the future Java EE 7 / Servlet 3.1 (and likely the future WAS 9 or 10 would support it). There are solutions in flavor of custom taglibs or by keeping them in a Map, all explained in detail in this answer: How to reference constants in EL?

    See also:

    • Our EL wiki page
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SimpleIni Documentation says wchar_t is supported but I don't understand how to use it.
The documentation says to use: $(input[type='checkbox']).bind( change, function(event, ui) { But I want to
Spring documentation says : Use the @RequestParam annotation to bind request parameters to a
The web2py grid/smartgrid documentation documentation has a long list of parameters, but a sparse
Heap Pollution documentation says in the last paragraph of this section that The static
I would like to use hilo generator but there is no any complete example
The documentation for @ParametersAreNonnullByDefault says, that: This annotation can be applied to a package,
MDN's documentation for Date.parse says: Parameters dateString A string representing an RFC822 or ISO
Documentation can be found here It says in the example: onDrop: Called whenever a
Constructor for PHP's exception has third parameter, documentation says: $previous: The previous exception used

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.