• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSTL issue in Tomcat

 
Ranch Hand
Posts: 81
IntelliJ IDE Oracle C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
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="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title> JSP is easy</title>
</head>
<body>
<%-- Calculate the sum of 1+2+3+4 dynamically --%>


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

In the IDE, against the taglib line, the error "The absolute uri: http://java.sun.com/jsp/jstl/core 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.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sen George
Ranch Hand
Posts: 81
IntelliJ IDE Oracle C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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.

Regards,
Sen
 
reply
    Bookmark Topic Watch Topic
  • New Topic