tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Burkhardt <...@imparisystems.com>
Subject Down the rabbit hole with JDBC
Date Thu, 24 Jul 2008 20:31:37 GMT
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
mlb@imparisystems.com
www.imparisystems.com
(301) 644-3911



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message