What does a $ symbol mean in a JSP

13,935

Solution 1

None of the taglib is necessary as it is a JSP 2.0 standard.

It just print the content of the variable in the document.

For more details about the EL expressions, this is the documentation you're looking for: http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html#1010522

Solution 2

AFAIK From JSP 2.0 the pattern ${ } is declared that identifies EL expressions. In short EL expressions are enclosed by the ${ } characters.

${applicationVersionNumber} What does this mean ?

This will print/refer to value of applicationVersionNumber.

Which one of these three lines is actually required for ${applicationVersionNumber} to work ?

None of them.

Share:
13,935
hop
Author by

hop

Updated on June 23, 2022

Comments

  • hop
    hop almost 2 years

    First of all, please bare my ignorance. This may be a very basic question. But I am not to find it out.

    I see some thing like this in the code. I dont understand what a JSTL is. Whatever I search, it redirects to JSTL related articles, which I seldom understand !

    ${applicationVersionNumber}
    

    What does this mean ? From where this value is read ? Any help is highly appreciated.

    Also I see the below on top of my file. Which one of these three lines is actually required for ${applicationVersionNumber} to work ?

    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib uri="http://jakarta.apache.org/taglibs/log-1.0" prefix="log"%>
    
  • n1r3
    n1r3 over 12 years
    Yes, no taglibs. It's not part of the JSTL but JSP 2.0
  • noogrub
    noogrub almost 11 years
    "EL" is short for "Expression Language". See en.wikipedia.org/wiki/Unified_Expression_Language
  • Steven R. Loomis
    Steven R. Loomis over 10 years
  • evaldeslacasa
    evaldeslacasa almost 4 years
    Seems like this other link is not accessible anymore!