tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <mdela...@yahoo.com>
Subject Re: Newbie Question
Date Thu, 12 Apr 2001 19:17:07 GMT
I would think that would work, but you might want to
try this in your web.xml instead:

  <taglib>
   
<taglib-uri>http://java.apache.org/taglibs/jdbc</taglib-uri>
    
    <taglib-location>jdbc.tld</taglib-location>
  </taglib>

Also, as a point of information, this line shouldn't
be necessary if you only access the database via the
tag library:

> <%@ page language="java" import="java.sql.*,
> oracle.jdbc.driver.*" %>

--- Dummy Amar <Dummy_Amar@stgeorgeconsulting.com>
wrote:
> Hi,
> 
> I downloaded the JDBC taglib directory and following
> the direction copied
> the jdbc.tld file under the /WEB-INF directory and
> jdbc.jar under
> /WEB-INF/lib directory. I also created an entry in
> the /WEB_INF/web.xml
> like
>    <taglib>
>         <taglib-uri>
> 	   http://java.apache.org/taglibs/jdbc</taglib-uri>
>        
> <taglib-location>/WEB-INF/jdbc.tld</taglib-location>
>     </taglib>
> 
> After that I tried the following JSP page
> 
> <%@ page language="java" import="java.sql.*,
> oracle.jdbc.driver.*" %>
> <%@ taglib
> uri="http://jakarta.apache.org/taglibs/jdbc"
> prefix="sql" %>
> 
> <%-- open a database connection --%>
> <sql:connection id="conn1">
>  
>
<sql:url>jdbc:oracle:thin:@oak.stgeorgeconsulting.com:1521:serverName</sql:url>
>  
>
<sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
> 
>   <%-- optional --%> 
>   <sql:userId>Usernmae</sql:userId>
>   
>   <%-- optional --%>
>   <sql:password>password</sql:password>
> </sql:connection>
> 
> 
> 
> <%-- close a database connection --%>
> <sql:closeConnection conn="conn1"/>
> 
> I am receiving the following error message
> 
> org.apache.jasper.JasperException: Unable to open
> taglibrary
> http://jakarta.apache.org/taglibs/jdbc : Could not
> locate TLD
> META-INF/taglib.tld
> 	at
>
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:672)
> 	at
>
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
> 	at
>
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> 	at
>
org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
> 	at
>
org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> 	at
>
org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
> 	at
>
org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
> 	at
>
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
> 	at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
> 	at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
> 	at
>
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
> 	at
>
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> 	at
>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> 	at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
> 	at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> Please help.
> 
> Thanks in advance
> Amar Das
> 


=====
Morgan Delagrange
Britannica.com

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Mime
View raw message