• 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

Error: package org.apache.taglibs.standard.tag.rt.core does not exist

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting these errors. I am using Apache Tomcat 8.0.9, with Netbeans. I have been trying to use this tutorial:
https://netbeans.org/kb/docs/web/mysql-webapp.html
(However, I am connected to an Oracle Database, not MySQL).

I did a similar setup/deployment on glassfish-4.1 and did not get these issues. It worked there.

If I remove these tags from the jsp file then the errors go away but then I wont get the data displayed from the database.



below is the entire jsp code


Below is the errors:
 
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
Where is your jstl.jar file located? It should be in your Tomcat \lib folder. If it's anywhere else then you have to add it to the Netbeans project as a library.
 
J. Kevin Robbins
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
And btw, using the SQL tags is a Bad Idea except for rapid prototyping. Never do that for production code. Move that database code to a DAO and use a PreparedStatement.
 
Jason Smit
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

J. Kevin Robbins wrote:And btw, using the SQL tags is a Bad Idea except for rapid prototyping. Never do that for production code. Move that database code to a DAO and use a PreparedStatement.



Will keep that in mind. Will try that after getting this test project to work.

I have managed to add the libraries as requested to the project so the error is no longer there.
However I am still getting these errors:



 
Sheriff
Posts: 67746
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
Your URIs are for very very old versions of the JSTL from JSP1.x. Are you sure that's what you want to use?

(Hint: no)
 
Jason Smit
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have added the following jar file to my library but still giving errors:

C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.9\lib\jstl-1.1.2.jar


Should URI link change?

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
 
Jason Smit
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is there anyway that I can have someone on Skype to speak to ? It would be great to have a "buddy" to bounce questions and answers via Skype.
 
Bear Bibeault
Sheriff
Posts: 67746
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
You should be using JSTL 1.2 unless you are using a servlet container that only supports JSP 1.x. Are you? Most probably not. (I see you are using Tomcat 8, which most definitely is not a JSP 1.x container).

Look up info for JSTL 1.2 and make sure you have the right jar files. Using the wrong versions will cause no end of frustrating and hard to debug problems whose error messages will be completely unhelpful.

Do this before you do anything else because nothing is going to work until you do.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Your URIs are for very very old versions of the JSTL from JSP1.x. Are you sure that's what you want to use?
(Hint: no)


Really?


These look fine to me. They have the /jsp/ section in them which was the difference between JSTL1.0 and JSTL1.1.
I didn't think the URI changed after that.

The error message seems to be coming from an Ant build file - presumably generated by NetBeans.
The build file appears to be pre-compiling your JSPs. (potentially an unnecessary step, as it can compile on the fly, but ok)
You said you changed from using Glassfish to Tomcat.
Have you updated the build file appropriately? What does the build-impl.xml file look like?

 
Bear Bibeault
Sheriff
Posts: 67746
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
The whole RT thing is a key clue. The RT library was pre-EL.
 
Stefan Evans
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>The whole RT thing is a key clue. The RT library was pre-EL.

Yes it was. Though more correctly the EL interpreter library internal to JSTL was pre EL understood by the container
The change in servlet 2.4/JSP2.0 was that EL expressions became runtime expressions.
So now everything uses the RT version of the code.

Prior to this there were two parallel libraries for JSTL
EL - Tags attributes were defined as taking "String". These string expressions were evaluated as EL within JSTL
RT - Tags attributes were defined as taking runtime expressions for those who wanted to use <%= expr %> with their JSTL tags.

As of JSP2.0 EL expressions were understood by the container - in effect they BECAME runtime expressions.
Because this changed the Tag definitions significantly, the introduced the new URI for the tag library - which was effectively the old RT version rebranded.

So the org.apache.taglibs.standard.tag.rt.core package in the generated code is perfectly legitimate.
ALL the tags are now evaluated as runtime expressions.
It's just that we don't often look at the servlet code generated for a JSP.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic