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

  • Home
  • SEARCH
  • 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 1031375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T13:55:09+00:00 2026-05-16T13:55:09+00:00

I have set a session scope object in my session and I want to

  • 0

I have set a session scope object in my session and I want to add a disabled attribute in one of my button using JSTL Ternary operator.

The getPermission is a map of privileges for the currently login user but I am not sure why I am encountering the error unterminated c:out tag in my JSP when it goes to this JSP.

<button type="button"  id="addButton" 
    <c:out value="${empty sessionScope.voUserInfo.getPermission.ADD_ITEM ? "disabled='disabled'" : ''}"/> >
    ADD
</button>
  • 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-16T13:55:09+00:00Added an answer on May 16, 2026 at 1:55 pm

    The first doublequote inside the value is breaking the value too early. You should use singlequotes only to denote strings in EL, not doublequotes. You should use doublequotes only to denote HTML attribute values.

    <button id="add" <c:out value="${empty var ? 'disabled="disabled"' : ''}"/>>
    

    (please don’t pay attention to the Stackoverflow code syntax highlighter, it doesn’t recognize taglibs/EL correctly, the above is legitimately valid)

    Or, when you’re on JSP 2.0 or newer, you can even just leave that c:out away as long as there’s no risk for XSS (which is not the case here since you’re printing a server-controlled value).

    <button id="add" ${empty var ? 'disabled="disabled"' : ''}>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to access a object using session scope . I am doing
I am currently in C# and I have set Session variables on each page.
I have tried the obvious SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED, but my
By requiring users to have a session set and if it is not redirecting
I recently discovered that when you have a page set to session readonly and
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']
I have set up upload_max_filesize and post_max_size to 32Mb in php.ini. I am using
I have a session-scoped bean in Spring that is set within the web context.
I have a form bean defined in session scope and a controller bean defined
Currently I have a session scoped object called MySessionData. Originally when logging out I

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.