This isn't a JDBC error as much as it's a taglib error. You are trying
to use JSTL taglibs in your web application and tomcat can't find the
libraries that contain the taglib. Things to check:
1. standard.jar and jstl.jar are in the webapp's WEB-INF/lib directory
-- at least for jstl 1.1. I believe jstl 1.2 consolidated things into
one jar file.
2. The webapp's docBase is not the same as the <Host ...> element's
appBase attribute in server.xml. This has already bitten one person on
the list today.
--David
Matt Burkhardt wrote:
Sorry - I've been slogging through this...
Anyway, I'm trying to get an application working, but all of their
documentation talks about is tomcat5.5 and I've got tomcat6
I have gotten the latest Connector/J binary from MySQL and installed in
into <tomcat>/lib but I would like to test it. So, I went to
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
and followed the instructions to set up a DBTest - but I get this
HTTP Status 500 -
________________________________________________________________________
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the
jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1433)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Here's the code that I'm running - are the taglibs incorrect?
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<sql:query var="rs" dataSource="jdbc/TestDB">
select id, foo, bar from testdata
</sql:query>
<html>
<head>
<title>DB Test</title>
</head>
<body>
<h2>Results</h2>
<c:forEach var="row" items="${rs.rows}">
Foo ${row.foo}<br/>
Bar ${row.bar}<br/>
</c:forEach>
</body>
</html>
Matt Burkhardt, MSTM
President
Impari Systems, Inc.
401 Rosemont Avenue
Frederick, MD 21701
[EMAIL PROTECTED]
www.imparisystems.com
(301) 644-3911
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]