http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-j2ee.html#connector-j-usagenotes-tomcat
specifies these configurationparameters
<Context ....>
  <Resource name="jdbc/MySQLDB"
               auth="Container"
               type="javax.sql.DataSource"/>
  <!-- The name you used above, must match _exactly_ here!

       The connection pool will be bound into JNDI with the name
       "java:/comp/env/jdbc/MySQLDB"
  -->
If the name you specify in java:/comp/env doesnt match the resource
then the container wont be able to locate the driver
Your best bet is to download AppServer, Taglibs and MYSQL with Sun App 
Server(now called Glassfish) in other words everything at

http://java.sun.com/javaee/downloads/index.jsp

HTH
Martin Gainty 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Subject: Down the rabbit hole with JDBC
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Date: Thu, 24 Jul 2008 16:31:37 -0400
> 
> 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
> 
> 

_________________________________________________________________
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008

Reply via email to