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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:06:38+00:00 2026-06-05T00:06:38+00:00

I cant figure out why this is not working. Basicly the following code-snippet workes

  • 0

I cant figure out why this is not working. Basicly the following code-snippet workes fine unless the c:if is true.

If the if-statement is true, then clientId should be set manually to 1. This does work, but for some reason then it will not fetch the clientProps.

ClientId=1 does work fine if it is fetched from the session-variable ‘user’. So clientProps should have something at spot 1.
Any clue?

<c:set var="clientId" value="${sessionScope['user'].client.clientId}"/>
<c:if test="${empty sessionScope['user'].client.clientId}">
    True
    <c:set var="clientId" value="1" />
</c:if>

<c:set var="clientProperties" value="${clientProps[clientId]}"/>
<c:set var="clientLogo" value="${clientProperties.clientLogo}"/>
<c:set var="clientURL" value="${clientProperties.clientWebURL}" />
clientId = ${clientId}
clientLogo = ${clientLogo}
clientURL = ${clientURL}

Result if user-object exists:

clientId = 1 clientLogo = /images/logos/Logo1.png clientURL = http://www.xxx.xxx

Result if user-object doesn exist:

True clientId = 1 clientLogo = clientURL =

  • 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-05T00:06:42+00:00Added an answer on June 5, 2026 at 12:06 am
    <c:set var="clientId" value="1" />
    

    This is setting it as a String while the map key is apparently Long.

    You need to set it as a Long instead.

    <c:set var="clientId" value="${1}" />
    

    Numbers in EL are implicitly treated as Long, that’s why the above will work.

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

Sidebar

Related Questions

I cant figure out why the this alert() part below is not working when
I am getting segmentation fault in this code but i cant figure out why.
Can't figure out why this is not working. First time using :has_many => :through
For the life of me I can't figure out why this is not working.
This is not working and I can't figure out where I went wrong: <style>
I can't figure out why this list is not displaying properly in IE7. The
Not sure why I can't figure this out. When a user makes a selection,
Not sure why I'm getting this error and can't figure it out? The cycle
I want to do something but cant figure out how to do this (i
This seems in my head like it should work but I cant figure out

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.