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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:23:49+00:00 2026-05-18T22:23:49+00:00

I have try to access the map in jsf using C:foreach.But i can’t access

  • 0

I have try to access the map in jsf using C:foreach.But i can’t access that in jsf by using”#” symbol.But i can access it using “$” symbol.But i need to access to displayed using jsf component h:outputtext.My sample code is

h:form binding="#{MapInJsf.initForm}">
                <c:forEach items="#{MapInJsf.nameMap}" var="nameMap">
                    <%--<li>${nameMap.key}</li>--%> I cann access it
                    <%--<h:outputText value="#{nameMap}"/>--%>
                    <h:outputText value="Name2 : #{nameMap.key}"/>
                   <h:outputText value="Last Name1 : #{nameMap.value}"/>
                </c:forEach>
            </h:form>

what i do wrong and how can i access that?My Ref link is
Dynamic value binding of JSF component
Please help me.

  • 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-18T22:23:50+00:00Added an answer on May 18, 2026 at 10:23 pm

    This will only work when you’re using JSP 2.1 or newer (Servlet 2.5 or newer). On JSP 2.0 or older (Servlet 2.4 or older), it is not possible to reference the c:forEach variable by deferred EL #{}. The deferred EL #{} was namely initially part of JSF 1.0 and was only later integrated in JSP 2.1, around the time JSF 1.2 was released. You should however be able to use standard EL ${}.

    <c:forEach items="${MapInJsf.nameMap}" var="nameMap">
        <h:outputText value="Name2 : ${nameMap.key}"/>
        <h:outputText value="Last Name1 : ${nameMap.value}"/>
    </c:forEach>
    

    But you won’t be able to bind it to an UIInput component like <h:inputText> since the ${} notation only calls bean getter, not setter.

    If you’re running a servlet 2.5 compatible container (like Tomcat 6.0 and up), then you need to ensure that your web.xml is declared as per Servlet 2.5. I.e. the root declaration must be as follows:

    <web-app 
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
        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_2_5.xsd"
        id="YourWebAppID"
        version="2.5">
    

    Only then you will be able to use deferred EL #{} on JSP tags like JSTL.

    See also:

    • Java/JSP article on The Unified Expression Language
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scenario that when I try to access a hash key using
I have an object that has properties, but when I try to access them,
I have NFS installed for Windows 2008 but when I try to access C:/Windows/System32/mount.exe
I have My Sharepoint Web Service URL, but when i try to access it
I try unsuccessful to access from my portlet the session attribute that I have
I have some data saved to my SharedPreferences but when i try to access
I try to access session variables stored on a different page. When I have
I have a file foo.bar.1 on my server and when I try to access
I have try { using (var eventWaitHandle = EventWaitHandle.OpenExisting(name)) { eventWaitHandle.Set(); } Environment.Exit(0); }
I have an intranet web app that uses CSS httpFolder to map a webdav

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.