Hello,

I'm trying to implement TagLib functionality into a webapp for the first
time. Everything seems correct, and I've been through a million sites and
tutorials. Yet I always get the following error upon loading the page (TC
4.1.12 / JDK 1.4.0_01):

org.apache.jasper.JasperException: /en/archiver.jsp(259,18) Unable to load
class ArchivePanel

Here are my files and setup. Can anyone see the problem? (I've seen some
archive responses related to v1.1 or v1.2 of the tld dtd. also, the machine
doesn't need internet connectivity does it? - to get those dtd's?). Finally
how can I enable jasper logging in TC4. That may help, but I don't see the
option in server.xml

 TIA - Eric


archiver.jsp
============
<%@ taglib uri="/WEB-INF/display.tld" prefix="display" %>

    some html and later in page..

<display:ArchivePanel />


web.xml
=======
<taglib>
  <taglib-uri>
    /WEB-INF/display.tld
  </taglib-uri>
  <taglib-location>
    /WEB-INF/display.tld
  </taglib-location>
</taglib>


display.tld
===========
<?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.1</jspversion>
 <shortname>display</shortname>
 <info>This tag library contains display components</info>
 <tag>
  <name>ArchivePanel</name>
  <tagclass>com.msg.display.ArchvePanel</tagclass>
  <bodycontent>empty</bodycontent>
 </tag>
</taglib>


ArchivePanel.java
=================
package com.msg.display;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.TagSupport;

public class ArchivePanel extends TagSupport {

 public int doStartTag() throws JspException {
  try {
   pageContext.getOut().print("Hello.");
  } catch (Exception ex) {
   throw new JspTagException("SimpleTag: " + ex.getMessage());
  }
  return SKIP_BODY;
 }

 public int doEndTag() {
  return EVAL_PAGE;
 }

}


If I try to troubleshoot myself I still get no where. For example, If I
change the jsp page to read

    <display:ArchivePannn />

I get the following error: No such tag ArchivePannn in the tag library
imported with prefix display.

So things are working to some extent. Everything compiles, everything is in
the correct location. No typos I can see. Heh. I'm at a loss.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to