Two Laptop Bag*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes taglib uri  cannot be resolved Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "taglib uri  cannot be resolved " Watch "taglib uri  cannot be resolved " New topic
Author

taglib uri cannot be resolved

Boobalan Pillai
Greenhorn

Joined: Nov 01, 2006
Posts: 9
Hi,

I am preparing for SCWCD.When tried to use few jstl tags in my application I am getting the following exception:

org.apache.jasper.JasperException: 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
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)


This is the steps I followed

1)I put jstl.jar,standard.jar in WEB-INF/lib dir...
2)I put entry in web.xml like
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/lib</taglib-location>
</taglib>

3)In my jsp file looks like this
<%@ page import="test.com.web.Person" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core " %>
<html>
<body>
<c:set target="${Person}" property="firstName" value="Bala"/>
Person's firstName-:${Person.firstName}
</body>
</html>


I am guessing that server doent refering the any tld file in the lib dir...

Where would be the error?

Thanks in advance
Bala.
SCJP1.4
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
Try this
<jsp:useBean id="person" class="test.com.web.Person" />
<c:set target="${person}" property="firstName" value="Bala"/>
Person's firstName-:${person.firstName}
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Boobalan,

1. you don't need the taglib declaration in web.xml
2. Remove the extra space after "core" :
Change <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core " %>
into <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


See here for more:
http://faq.javaranch.com/view?JstlTagLibDefinitions
[ November 07, 2006: Message edited by: Satou kurinosuke ]

[My Blog]
All roads lead to JavaRanch
 
 
subject: taglib uri cannot be resolved
 
Similar Threads
page 434 JSTL
Cannot use JSTL
Enabling JSTL tags
JSTL - abolute uri cannot be resolved
Not able to access JSTL tags