• 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

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
:confused:

I have a problem that is baffling me and I desperately need help. This question may have been asked before however, I cannot find any reference to it. Let me set up my sceneario... I am working through the tutorial offered through Oracle related to creating an ecommerce web site using Netbeans called the "Affablebean" tutorial. My Netbeans, Java version are listed below:

Product Version: NetBeans IDE 7.1.1 (Build 201202271535)
Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

I am using a glassfish server ver 3.1.2 which comes with the Netbeans package along with the latest version of Java EE as described above. I am implimenting a MVC framework and have created all of my views and the database which is a MySQL database which is designed and has been forward engineered to the application through workbench. I have a good connection to both the Glassfish server and MySQL server. I have created the connection pool which is working from the Glassfish server to the MySQL server. When I ping MySQL server through the Glassfish admin console I get a positive result and a verified connection.

My web.xml file is configured correctly. I am working through the tutorial called "Affablebean" which an ecommerce web site that is quite complex for a greenhorn application developer as I am. Now to my problem... I have built a test folder and a test jsp page to test if I can query the database and get the results to show up correctly on the test jsp page. I cannot get past this part of the tutorial. The tutorial was designed for an earlier version of Netbeans which is no longer available to download so I have had many obsticles because of the version incompabilities and bugs in Netbeans. When I run the test page and try and build it I get MASSIVE errors and it will not build. I get the following error in the build window:

"java:161: error: package org.apache.taglibs.standard.tag.rt.core does not exist".

I have researched this problem online and found a solution which was to add the following lines of code to the web.xml file to identify these tag libaries. I added the following to the web.xml file:

xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"

This code has not solved the problem. The taglib directives for the JSTL core and sql libraries at the top of the test jsp page show the following errors:

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

My web.xml file looks as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" >
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<jsp-config>
<jsp-property-group>
<description>header and footer settings</description>
<url-pattern>/index.jsp</url-pattern>
<url-pattern>/WEB-INF/view/*</url-pattern>
<include-prelude>/WEB-INF/jspf/header.jspf</include-prelude>
<include-coda>/WEB-INF/jspf/footer.jspf</include-coda>
</jsp-property-group>
</jsp-config>
<resource-ref>
<res-ref-name>jdbc/affablebean</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>


One of the problems I think I have is that I may not have the following attritbute configured or pointing to the proper place: id="" I am not sure what should be in this attritbute. In addition, am I doing everything correctly or am I missing some steps to get a test jsp page to query a database and print out the expected results. I would really be grateful to anyone who might be able to point out where my logic or my application is incorrect. Thanks a bunch.... Dan Dallas
 
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 shouldn't need to add anything at all to the web.xml. If the jar files for the JSTL have been properly placed into WEB-INF/lib, the contain should find them automatically.
 
Dan Dallas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You shouldn't need to add anything at all to the web.xml. If the jar files for the JSTL have been properly placed into WEB-INF/lib, the contain should find them automatically.



 
Dan Dallas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do the jar files get automatically placed in the WEB-INF/lib when Netbeans is installed on a computer? How do I find out where and what is installed in the WEB-INF/lib? How do I get older versions into this file to support older applications? I am a real greenhorn and struggle with exactly what jar JSTL files do. Could you give me some clue? Thanks for your help.
 
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
I have no idea as I don't use Netbeans. Look in the folder and see if they're there. They're usually named something like jstl.jar and standard.jar.

As you're relying on Netbeans (too much in my opinion), I've moved this to the IDEs forum.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
add jstl core tld and import that tld in your jsp
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic