tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopal, Venu" <vgopa...@sprintspectrum.com>
Subject RE: info required
Date Sat, 06 Oct 2001 17:30:50 GMT
Hello,

Does any body has got a sample tag using the javabeans to display the values
to the user.

Thanks for help
venu

-----Original Message-----
From: Amitkumar J Malhotra [mailto:Amitkumar_J_Malhotra@ril.com]
Sent: Friday, October 05, 2001 10:54 PM
To: taglibs-user@jakarta.apache.org
Subject: RE: info required




Hello Murugan,
I have tried everything that is given in the tutorials of dbtaglibrary and
also
the things which you had told me to do,
but nothing is working so I am sending the code itself.....

This is the web.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
   <taglib>
      <taglib-uri>http://jakarta.apache.org/taglibs/dbtag</taglib-uri>
       <tablib-location>web-apps/Web-inf/dbtags.tld</taglib-location>
     </taglib>
</web-app>


Here is the JSP file.
<html>
<body>
<%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>

<sql:connection id="conn1">
   <sql:url>jdbc:odbc:db2</sql:url>
   <sql:driver>sun.jdbc.odbc.JdbcOdbcDriver</sql:driver>
</sql:connection>

<table>
<sql:statement is="stmt1" conn="conn1">
   <sql:query>
      select * from status
   </sql:query>

   <sql:resultSet id="rset2">
      <tr>
          <td><sql:getColumn position="1"/></td>
           <td><sql:getColumn position="2"/></td>
       </tr>
   </sql:resultSet>
</sql:statement>
</table>


<sql:closeConnection conn="conn1"/>

</body>
</html>


and here is the error


Error: 500
Location: /taglibexamples/taglibrary.jsp
Internal Servlet Error:

org.apache.jasper.compiler.CompileException:
D:\jakarta-tomcat-3.2.1\jakarta-tomcat-3.2.1\webapps\taglibexamples\taglibra
ry.jsp(2,0)

Unable to open taglibrary http://jakarta.apache.org/taglibs/dbtags : null
     at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:713)

     at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)

     at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
     at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
     at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
     at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
     at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
     at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)

     at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
     at org.apache.tomcat.core.Handler.service(Handler.java:286)
     at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
     at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
     at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
     at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)

     at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
     at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
     at java.lang.Thread.run(Thread.java:484)



please help me out in this











Mime
View raw message