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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:38:01+00:00 2026-05-31T06:38:01+00:00

JSTL variable values are not shown in EL. For example this code: <%@ taglib

  • 0

JSTL variable values are not shown in EL. For example this code:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html>
<body>
  <c:forEach var="i" begin="1" end="5" >
    <c:out value="${i}" /> 
  </c:forEach>
</body>
</html>

browser renders like: ${i} ${i} ${i} ${i} ${i}

Or this one:

<c:set var="someVar" value="Hello"/>
<c:out value="${someVar}"/>

browser displays: ${someVar}

I’m using Spring-MVC 3 and Maven to build the sample project, deploying it to Tomcat 7.
In Spring’s context I have view resolver configurated as follows:

<bean class=
    "org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass" value="
        org.springframework.web.servlet.view.JstlView"></property>
    <property name="prefix" value="/WEB-INF/"></property>
    <property name="suffix" value=".jsp" />
</bean>

Model variables passed form Spring’s controller not shown as well.

Mavens pom.xml has following jstl related dependencies:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>javax.servlet.jsp</groupId>
    <artifactId>jsp-api</artifactId>
    <version>2.1</version>
    <scope>provided</scope>
</dependency>

So, any suggestions how to resolve this?

  • 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-31T06:38:02+00:00Added an answer on May 31, 2026 at 6:38 am

    So, the EL (those ${} things) doesn’t get executed? That can happen when your servletcontainer runs at Servlet 2.3 / JSP 1.2 modus or lower, while you’re using JSTL 1.1 or newer. During the change from JSTL 1.0 to 1.1, EL was moved from JSTL into JSP. That was JSP 2.0, which is part of Servlet 2.4. JSP 1.2 and older doesn’t have EL bundled. JSTL 1.1 and newer doesn’t have EL bundled.

    You need to make sure that your web.xml root declaration conforms at least Servlet 2.4. As you’re using JSP 2.1, which is part of Servlet 2.5, you’re apparently targeting a Servlet 2.5 compatible container. So, make sure that your web.xml root declaration conforms Servlet 2.5:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app
        xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
        version="2.5">
    
        <!-- Config here. -->
    
    </web-app>
    

    Tomcat 7 is however a Servlet 3.0 compatible container. I’d consider changing maven pom to declare Servlet 3.0 / JSP 2.2 so that you can benefit all the new Servlet 3.0 features.

    See also:

    • Our JSTL wiki page
    • History of EL
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I assign hidden value to JSTL variable? Example: <input type=hidden name=userName value=Administrator
Why would the pageContext variable not be findable in this custom tag installed in
On a JSTL/JSP page, I have a java.util.Date object from my application. I need
I am using jstl for small testing. And it is not working how it
Is having tags inside a jstl tag considered bad form? So for example I
is it possible to do something like this in JSTL: <div class=firstclass<c:if test='true'> someclass</c:if>>
I want to do something like this: <display:table name=${summary${index}}> But it does not work
Suppose, I'm working with Java servlet, JSP, JSTL/EL or JSF. As far as I
I have to access the JSTL variable which is calculated inside the iterator. Excerpt
I'm a jstl newbie so probably this question will sound to you funny. Anyway,

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.