File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Unable to Resolve JSTL taglib Declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to Resolve JSTL taglib Declaration" Watch "Unable to Resolve JSTL taglib Declaration" New topic
Author

Unable to Resolve JSTL taglib Declaration

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hi Everyone,

I am trying to use JSTL taglibs in my JSP page. I have added the line:

at the start of the JSP. I also have standard-1.0.6.jar and jstl-1.0.4.jar downloaded from maven in my classpath. But in Eclipse I get an error saying that:

Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Verify that those jars are in ' WEB-INF/lib' of your application.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Yup they are in WEB-INF/lib folder of my eclipse project. Also would like to know that should we make changes in the web.xml file for adding taglibs?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Isn't that a really old version? (Can't keep the versions straight in my head.)

If it is, try:as the URI--it changed.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
http://java.sun.com/jstl/core worked! Man... these versions!
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well now i run the jsp page and i get an error:


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Where do you configure soemthing to use /WEB-INF/c.tld?
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well i didn't get your question! Well eclipse does that automatically edits the web.xml file, doesn't it?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Something in your project refers to /WEB-INF/c.tld. If there's no TLD file there that won't work.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

Why are you using an antiquated version of the JSTL to being with?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well my web application is in version 2.4. I am using Tomcat 6.0.20. Actually I have to use the code for Java 1.4. So i have to use JSTL 1.1 specification. I read that JSTL 1.2 can be used for web application version 2.5 and and Java 1.5.
Sri Karr
Greenhorn

Joined: Mar 19, 2008
Posts: 9
Have you looked at your web.xml file in your application.
I hope the below information will resolve your problem.

http://faq.javaranch.com/java/SetupJstlForJsp2

How do I declare the web.xml file for Servlets 2.5 and JSP 2.1? (Tomcat 6.0.14 and so on)

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>web app name here</display-name>

<!-- rest of declarations go here -->

</web-app>
How do I declare the web.xml file for Servlets 2.4 and JSP 2.0? (Tomcat 5, Resin 3, and so on)


<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<display-name>web app name here</display-name>

<!-- rest of declarations go here -->

</web-app>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to Resolve JSTL taglib Declaration