Hello Morgan, hello Amar,

isn't their another error in the code of Amar?

If I understood the thing right (I am newbie too), the "taglib-uri-Tag"
defines a sort of placeholder for the real location, which is defined in the
"taglib-location-Tag".

Amar wrote
<taglib-uri>http://***java***.apache.org/taglibs/jdbc</taglib-uri> but
refers to ***jakarta***.apache.org/taglibs/jdbc in the JSP-Page.

The JSP Container doesn't find the specified URI in the web.xml and takes
the URI itself (http://jakarta.apache...) as the default location for the
tag library descriptor file. Because their isn't the TLD, the container
produces the error.

I think it is less complicated, if one uses the default location like
   <%@ taglib uri="/WEB-INF/jdbc.tld" prefix="sql" %>
for learning or testing purpose. I use some Jakarta Taglibs without any
<taglib>-Entry in the web.xml.


Regards
Stefan Riegel


> -----Ursprungliche Nachricht-----
> Von: Morgan Delagrange [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 12. April 2001 21:17
> An: [EMAIL PROTECTED]
> Betreff: Re: Newbie Question
>
>
> 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 <[EMAIL PROTECTED]>
> 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:ser
> verName</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.handleDirecti
> ve(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.loadIfN
> ecessary(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(ServletWra
> pper.java:503)
> >     at
> >
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> >     at
> >
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:160)
> >     at
> >
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEnd
> point.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/
>

Reply via email to