Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jstl and c:out value not being evaluated

843836May 28 2004 — edited Jun 1 2004
I'm hoping someone can help me. I'm going crazy trying to figure this
out. I've done a search through groups.google.com to no avail. If
this belongs somewhere else, please let me know.

I have been teaching myself struts. I've been using the logic tags
and wanted to move to jstl core tags.

My configuration is as follows:

Tomcat 5.0.14

I downloaded the Jakarta-taglibs-standard-current.zip file (standard not the standard 1.0). I
extracted jstl.jar and standard.jar and placed these in my
APPLICATION//WEB-INF/lib directory. I then extracted the c.tld and
placed it in APPLICATION/WEB-INF. My relevant part of my web.xml
looks as follows:

<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
<taglib>

I then try to display a simple jsp file to test this.
APPLICATION/Test.jsp

Test.jsp:

<%@page contentType="text/html"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head><title>JSP Page</title></head>
<body>
<c:out value="${2 + 2}" />

</body>
</html>

The result I get on the page is:

${2 + 2}

I'll assume I am doing something fundamentally wrong here as I am only 2 months into Java and servlet technology. Why isn't the value in the c:out being evaluated and printing 4 instead of the
literal "${2 + 2}"? The Tomcat configuration seems fine, as the struts' logic tags are working fine.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2004
Added on May 28 2004
5 comments
397 views