aspose file tools*
The moose likes JSP and the fly likes JSTL issue in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL issue in Tomcat" Watch "JSTL issue in Tomcat" New topic

JSTL issue in Tomcat

Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76
I am using NetBeans IDE 7.0.1 and the Tomcat server version is 7.0. I am trying to run a simple jsp which is given below.

<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="" %>
<title> JSP is easy</title>
<%-- Calculate the sum of 1+2+3+4 dynamically --%>

1 + 2 + 3 + 4 = <c:out value="${1+2+3+4}" />

In the IDE, against the taglib line, the error "The absolute uri: cannot be resolved in either web.xml or the jar files deployed with this application" is shown. The jar file jstl-api-1.2.jar is present under WEB-INF/lib directory.

And, while trying to run the file, the error "org.apache.taglibs.standard.tag.rt.core does not exist" is shown in the log.

Please advise how this error can be rectified.
J. Kevin Robbins
Ranch Hand

Joined: Dec 16, 2010
Posts: 632

This sounds like a netbeans issue. When you created the project did you choose "Java Web" and "Web Application"?

You also need standard.jar. A normal install of Tomcat should include jstl.jar and standard.jar in the tomcat/lib folder.

Check the project properties, Libraries category, and make sure that the jstl and standard jars are in the compile-time library list.

"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76

Thanks for the tip. When I added the jstl library to the project and rebuilt the project, it all worked fine. Thanks for the help.

It is sorta covered in the JavaRanch Style Guide.
subject: JSTL issue in Tomcat
Similar Threads
Unable to get EL to work
Unable to initialize TldLocationsCache: null
How to run simple JSTL page?
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
Not able to access JSTL tags