tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Southern" <south...@heymax.com>
Subject Error When Attempting To Use Custom Tag
Date Wed, 18 Oct 2000 23:40:59 GMT
What problem does the following error indicate when attempting to use a
custom tag in a JSP page?

Error 500
Location: /testing/index.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to load class
com.somecompany.tools.tags.Sample.class
	at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java,
Compiled Code)
	at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
rseEventListener.java, Compiled Code)
	at
org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
istener.java, Compiled Code)
	at
org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
tListener.java, Compiled Code)
	at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java, Compiled Code)
	at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java, Compiled Code)
	at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
	at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
	at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
	at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java, Compiled
Code)
	at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java, Compiled Code)
	at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va, Compiled Code)
	at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
Compiled Code)
	at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled
Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j
ava, Compiled Code)
	at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java,
Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java,
Compiled Code)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java, Compiled Code)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
	at java.lang.Thread.run(Thread.java, Compiled Code)


I am attepting to create a custom tag library on using Tomcat 3.1 on Linux
without creating a JAR for the tag library and creating a WAR for the
applicaton.

- I have created an expanded web application (no WAR) and have registered
the web application in TOMCAT_HOME/conf/server.xml.

- I have modified the TOMCAT_HOME/webapps/APP/WEB-INF/web.xml file for the
application that will be using the tags and placed the TLD in the tlds
directory under WEB-INF.

- The class file has been placed in the appropriate package subdirectory
under APP/WEB-INF/classes (e.g. com./somecompany/tools/tags).

This is the source for the JSP file that throws the error.
<%@ taglib uri="/lib1" prefix="lib1" %>
<html>
<head>
<title>Test JSP</title>
</head>
<body bgcolor="#ffffff" text="#000066">
This is a test.
<form action="test.jsp" method="post">
<select name="day" size="1">
<lib1:sample default="10"/>
</select>
</form>
</body>
</html>

What am I missing?

TIA,
Jason

==========================
Jason Southern
southern@heymax.com



Mime
View raw message