Getting problem in tag libraries,please help!!!

hello.
i am writing simple tag for accessing database.
i am getting follwing error
=======================================================================
weblogic.servlet.jsp.JspException: (line 26): Could not parse deployment descrip
tor: java.io.IOException: cannot resolve '/WEB-INF/DemoTags.tld' into a valid ta
g library
at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:863)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:47
14)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4538)
at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4385)
at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2223)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:2006)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1888)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1107)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:89)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:193)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:341)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:201)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:370)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:240)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:321)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
========================================================================
i am using weblogic 6.1
i have put my tld file in /WEB-INF/DemoTags.tld
i don;t know why i getting this error.
my tld file is as follow.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>DemoTags</shortname>
<uri>http://www.stardeveloper.com</uri>
<info>Demo Tags Library</info>
<tag>
<name>displaydata</name>
<tagclass>Tags.DataAccessTag</tagclass>
<teiclass>Tags.DataAccessTagTEI</teiclass>
<bodycontent>JSP</bodycontent>
<info>Data Access Tag.</info>
</tag>
</taglib>
and my class file is in /WEB-INF/classes/Tags/DataAccessTags.java
and /WEB-INF/classes/Tags/DataAccessTagsTEI.java
package Tags;
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.tagext.BodyTag;
import javax.servlet.jsp.tagext.Tag;
public class DataAccessTag implements BodyTag
     private PageContext pc=null;
     private BodyContent body=null;
     private StringBuffer sb=new StringBuffer();
     private Connection conn=null;
     private Statement stmt=null;
     private ResultSet rs=null;
     public void setPageContext(PageContext p)
          pc=p;
     public void setParent(Tag t)
     public Tag getParent()
          return null;
     public int doStartTag() throws JspException
          String path="jdbc:odbc:Names";
          String sql="select ID,first_name,last_name from Names";
          try
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               conn=DriverManager.getConnection(path);
               stmt=conn.createStatement();
               rs=stmt.executeQuery(sql);
               setVariables();
          }catch(SQLException e)
               throw new JspTagException("An SQLException occured");
          }catch(ClassNotFoundException e)
               throw new JspTagException("Jdbc driver not found");
          return EVAL_BODY_TAG;
     public void setBodyContent(BodyContent b)
          body=b;
     public void doInitBody() throws JspException{}
     private boolean setVariables() throws JspTagException
          try
               if(rs.next())
                    pc.setAttribute("id",rs.getObject(1).toString());
                    pc.setAttribute("first_name",rs.getObject(2).toString());
                    pc.setAttribute("last_name",rs.getObject(3).toString());
                    return true;
               }else
                    return false;
          }catch(SQLException e){
               throw new JspTagException("SQLException occured");
     public int doAfterBody() throws JspException
          try{
               sb.append(body.getString());
               body.clear();
          }catch(IOException e){
               throw new JspTagException("Fatal IOException");
          if(setVariables())
               return EVAL_BODY_TAG;
          try{
               body.getEnclosingWriter().write(sb.toString());
          }catch(IOException e){
               throw new JspTagException("fatal IOException");
          return SKIP_BODY;
     public int doEndTag() throws JspException
          try{
               if(rs!=null)
                    rs.close();
                    rs=null;
               if(stmt!=null)
                    stmt.close();
                    stmt=null;
               if(conn!=null)
                    conn.close();
                    conn=null;
          }catch(SQLException e){
          return EVAL_PAGE;
     public void release()
          pc=null;
          body=null;
          sb=null;
and DataAccessTagTEI.java
package Tags;
import javax.servlet.jsp.tagext.*;
public class DataAccessTagTEI extends TagExtraInfo
     public VariableInfo[] getVariableInfo(TagData data)
          return new VariableInfo[]{
               new VariableInfo("id","java.lang.String",true,VariableInfo.NESTED),
               new VariableInfo("first_name","java.lang.String",true,VariableInfo.NESTED),
               new VariableInfo("last_name","java.lang.String",true,VariableInfo.NESTED)
please help me...

package your class(es) as a jar file and put in the lib directory of your web application.

Similar Messages

Maybe you are looking for

  • Line Items used in Info Cube

    Hi All, Can anybody give me a clear concept of line items used in Infocube. I want to know what is the concept behind using the line items. How does it effect the performance of a Infocube. Regards, Kshitij

  • Dbca in Solaris 10

    Very simple question but nothing on google! How do you run dbca? I logged in as the oracle user and went into /uo1/app/product/11.2.0/dbhome_1/bin/ I tried ./dbca and cursor blinks for a few seconds before going to next line!

  • Combine multiple oracle 10g db as one 11g database with different schemas

    We have 3 10g databases on a solaris machine We are planning to migrate them and upgrade to 11g rel2 on linux machine and finally merge those into one database as different schemas has anyone got good ideas of the best strategy to do that thanks

  • Can I have more than one website?

    Hi I produced a site for a charity I am involved in and have been asked to produce another.. Can I do this and maintain the existing one, sorry of this a dumb question!?

  • Help Infinity blade Download error 8008

    Okay I've tryed to download Infinity blade 2 for my Itunes and Iphone but I keep getting error 8008 and I have tryed to go to the download folder and delete the temp fiels didnt help the least. I've also tryed to download it on my Iphone 4S and it do