: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