jstl and c:out value not being evaluated

D

Damian Sobieralski

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.13

I downloaded the Jakarta-taglibs-standard-current.zip file. 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:eek:ut 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. Why isn't
the value in the c:eek:ut being evaluated and printing 4 instead of the
literal "${2 + 2}"? The Tomcat configuration seems fine, as the
struts' logic tags are working fine.
 
S

Sudsy

Damian said:
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.
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
<taglib>

Shouldn't this be </taglib>? Or was it just a typo? Always best to
cut-and-paste from the real files...
 
D

Damian Sobieralski

Shouldn't this be </taglib>? Or was it just a typo? Always best to
cut-and-paste from the real files...

Yup, it's supposed to be </taglib>. I did copy-paste from a real
file but I cleaned up the message a bit before I sent it and
apperently I deleted the wrong tag :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top