Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Cannot import Taglib JSTL

 
Greenhorn
Posts: 6
Eclipse IDE Tomcat Server Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I cant find jstl.jar in the web. Sun's page... I mean... Oracle's page says that JSTL is now part of JavaEE 5 platform. I'm using JDK1.5.0 and Tomcat 6, but when I put <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> in my JSP, i get an error sayin that Eclipse (Helios) cannot find the tag descriptor.
Does anyone knows what I'm missing?
 
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you need to find a JSTL 1.2 or 1.1 implementation and add it to the app. The JSTL is not part of the JDK nor is it provided by Tomcat.

Apache's implementation can be had here.
 
Bartender
Posts: 1845
10
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm. Bear, the page you linked doesn't appear to have download links that work.

Here are a couple that do:

JSTL1.0: http://archive.apache.org/dist/jakarta/taglibs/standard-1.0/
JSTL1.1: http://archive.apache.org/dist/jakarta/taglibs/standard/
JSTL1.2: ???

 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stefan Evans wrote:Hmm. Bear, the page you linked doesn't appear to have download links that work.


Hmmm, someone at Apache is asleep at the wheel! Thanks for the working links.

 
Flavio Ortellao
Greenhorn
Posts: 6
Eclipse IDE Tomcat Server Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've found some jstl jars in an old project...
But it is suspicious that since those links are dead, there's no any "official" provider...
Is it possible that this happens due to be JSTL deprecated or maybe obsolete?
 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Flavio Ortellao wrote:Is it possible that this happens due to be JSTL deprecated or maybe obsolete?


Ummm, no.
 
Ranch Hand
Posts: 56
Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It may be a 'dirty hack' but:
If you download Geronimo 2.2.1 from Apache, you'll find a jstl-1.2.jar in the repository/javax/servlet/jstl/1.2 subdirectory. I copied this jarfile into the $CATALINA_HOME/lib directory and a <c:forEach> construct seemed to work fine.
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSTL libraries comes with Tomcat, just look for the .jar files.
 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat includes the JSTL 1.1 jars in the examples web app. But not JSTL 1.2 -- at least not yet.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Flavio Ortellao wrote:But it is suspicious that since those links are dead, there's no any "official" provider...


I agree that it's strange. Normally, they'd be available somewhere around here: http://java.net/projects/jstl/, but the whole java.net web site is undergoing a massive reorganization, which currently means that only the source code is available, but no binaries. Eventually, the site will have the binaries, but I don't think a timeline has been announced for that yet. For the moment, downloading GlassFish is your best option (or building from source, which is easy enough if you have SVN and Maven available).
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Normally, they'd be available somewhere around here: http://java.net/projects/jstl/, but the whole java.net web site is undergoing a massive reorganization, which currently means that only the source code is available, but no binaries.


Binaries are now available one again: http://jstl.java.net/download.html
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I downloaded the JSTL 1.2 JAR files (jstl-api-1.2.jar and jstl-impl-1.2.jar). Put them under WEB-INF\lib, however I still get the error message:


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



What would be cause of the problem?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I also got the same problem. and add the following file to visualize.

[Edit: link removed due to excess advertising. Please copy and past text, not images or links.]

and also the following is my version info ..

Server info: Apache Tomcat/7.0.26
Servlet version: 3.0
JSP version: 2.1
Java version: 1.7.0_03

I have built my web.xml according to https://coderanch.com/how-to/java/ServletsWebXml

thanks in advance...
for those who gonna look and help me solve the problem.
 
tyte kyat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, now I got the problem(the above) sorted ...

all we have to do is just to put the both files (jstl-api and jstl-impl) under lib folder..

Thanks.
 
Nam Ha Minh
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tyte kyat wrote:Hi, now I got the problem(the above) sorted ...

all we have to do is just to put the both files (jstl-api and jstl-impl) under lib folder..

Thanks.



That isn't enough, I have to put some xmlns declaration in the web.xml file:
 
Bear Bibeault
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nam Ha Minh wrote:That isn't enough, I have to put some xmlns declaration in the web.xml file:


Absolutely incorrect. No entries in the web.xml need to be made or should be made. The container will automatically find the TLDs in the jar files deployed in WEB-INF/lib.
 
Nam Ha Minh
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Nam Ha Minh wrote:That isn't enough, I have to put some xmlns declaration in the web.xml file:


Absolutely incorrect. No entries in the web.xml need to be made or should be made. The container will automatically find the TLDs in the jar files deployed in WEB-INF/lib.



No, it's true in my case. Maybe the TLDs are missing so the xmlns is required.
 
You can't expect to wield supreme executive power just because
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic