JSTL example error

Posted on 2012-08-10
Last Modified: 2012-08-14

I was trying following JSTL example after downloaded JSTL jar and exractin and keeping tlds under WEB-INF/tld directory.

When I run the application it is throwing error as in attachment. Please advise on fixing it.

Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld"%>
<%@ taglib prefix="sql" uri="/WEB-INF/tld/sql.tld"%>
Setting the value:
<b>Hello World! </b>
in a variable named
<c:set var="hello" value="Hello World!" />
<br />
The value in
variable is :
<c:out value="${hello}" />
      java.util.List list = new java.util.ArrayList();
      pageContext.setAttribute("list", list);
<br />
Following are the names in a collection.
<br />
<c:forEach var="name" items="${list}">
      <c:out value="${name}" />
      <br />
Following is a demo of c:choose tag
<br />
<c:set var="test" value="Hello" />
      <c:when test="${test=='Hello'}">
            <c:out value="The value is Hello" />
            <c:out value="The value is not Hello" />
Question by:gudii9
    LVL 27

    Accepted Solution

    >after downloaded JSTL jar  
    Which jar did you download ? From where?
    >exractin and keeping tlds under WEB-INF/tld directory.  
    No, don't do that. Just put the jars in your library(which will end up in the lib folder on the server). The web server will find the tlds.
    LVL 7

    Author Comment

    I kept all the TLD files at attached highlighted location under WEB-INF/tld
    LVL 7

    Author Comment

    what jar i need to keep under WEB-INF/lib directory. Please advise
    LVL 7

    Author Comment

    I have been going through following link

    they mentioned either I can keep jar file under web-inf/lib or put all tld files as well at tld folder. Still not working. Please advise
    LVL 7

    Author Comment

    where can I download the jar file to include. I could not find jar in above link also. Please advise
    LVL 7

    Author Comment

    I found the JARS at link

    after copying to webinf/lib and putting tld working fine
    LVL 27

    Expert Comment

    I am sorry. I was away from my desktop for a few days.  
    Do you need any help ?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This video teaches viewers about errors in exception handling.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now