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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:35:57+00:00 2026-06-13T12:35:57+00:00

I am loading a map of values into ServletContext during start of the application/server

  • 0

I am loading a map of values into ServletContext during start of the application/server

HashMap<String, List<String>> cfsUfsMap = new HashMap<String, List<String>>();
//some operations
application.setAttribute("UDM_UFS_CFS_MAP", cfsUfsMap); //application = ServletContext

I need to use this map directly in JSP page, for which I have done this

<s:set name="udm_cfs_ufs_map" value="#application.UDM_UFS_CFS_MAP" />
<table class="first" width="100%" border="0" cellpadding="0" id="sups_assignedservices_info_table">
<tr>
    <th width="30%">Assigned service name </th>
    <th width="15%">CFS Code </th>
    <th width="15%">Status </th>
    <th width="20%">Date </th>
    <th width="20%">UDM </th>
</tr>
<s:iterator value="#sups_services.services">
    <s:set name="ufs_list" value="#udm_cfs_ufs_map.['top.code']" /> 
    <tr>                
        <td class="light"><s:property value="top.name"/> </td>
        <td class="light"><s:property value="top.code"/> </td>
        <td class="light"><s:property value="top.status"/> </td>
        <td class="light"><s:property value="top.date"/> </td>  
        <td class="light"><s:property value="#udm_cfs_ufs_map.size()" /> - <s:property value="#ufs_list.size()" /></td>
    </tr>   
</s:iterator>

As you see, I am trying to get the values (List) from map using key which’s top.code
However I am getting original map size but not the list size based on key.

Any idea what’s missing/going wrong

  • 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-13T12:35:57+00:00Added an answer on June 13, 2026 at 12:35 pm

    Done.

    I solved it myself. I am posting my mistakes and the correct solution. SO down the line it might be useful to someone

    to access servletContext attributes

    <s:set name="udm_cfs_ufs_map" value="#application.UDM_UFS_CFS_MAP" />
    

    for fetching the content from the map based on key

    <s:iterator value="#sups_services.services">
    <s:set name="ufs_list" value="#udm_cfs_ufs_map[top.code]" />
    <tr>
        <td class="light"><s:property value="top.name" /></td>
        <td class="light"><s:property value="top.code" /></td>
        <td class="light"><s:property value="top.status" />
        </td>
        <td class="light"><s:property value="top.date" /></td>
        <td class="light"><s:iterator value="ufs_list">
                <s:property />
                <br />
            </s:iterator></td>
    </tr>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know why loading a KML file into my sencha touch google map
When loading some directions the map adjusts to the appropriate zoom level. Then I
I was loading data from database and inserting it into a map. When I
I'm displaying some icons (annotations) on a map in my app by loading them
I take two values (source, destination) from the user and while loading the map
I have problem with google map Loading and making center in my java script
I have a view containing a UIWebView which is loading a google map (so
In the DOM I am loading a static Google Map image. When the document
Loading images into Flex (size < 100kb) causes IE7 memory increase by a megabyte
I am loading an image to my silverlight application. This image will fit in

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.