• Post Reply Bookmark Topic Watch Topic
  • New Topic

taglib uri cannot be resolved

Boobalan Pillai
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

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

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 " %>
<c:set target="${Person}" property="firstName" value="Bala"/>
Person's firstName-:${Person.firstName}

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

Where would be the error?

Thanks in advance
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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é
Posts: 14691
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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:
[ November 07, 2006: Message edited by: Satou kurinosuke ]
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!