You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Elijah Jacobs <el...@hotmail.com> on 2002/02/04 17:33:20 UTC
cannot find tag library
Hi all,
I am using Tomcat 4.01; Windows 2000 ; Struts v1.0
I created a tag which displays a message on the screen. I followed the
basic layout of the example that came with struts. by "layout" I mean:
1. I created a tag under the /classes directory. this time I put it right
under the /classes directory so I didn't need to deal with package names.
2. I added the tag in the app.tld (which is right under /web-inf)
3. On my jsp page, I reference the TLD file and gave it a prefix "app" (just
like the example).
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>
when I do " <app:hello /> " in my JSP page (Bid.jsp) I get:
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
HelloTag _jspx_th_app_hello_0 = new HelloTag();
^
I am not sure why it's looking for my HelloTag under org.apache.jsp when I
put it on the /classes directory. I have other Java files right under the
/classes directory and Tomcat 4.0.1 was able to find them - although they
were not custom tag file, but that shouldn't matter, right?
thanks in advance,
- ej -
p.s. below are parts my app.tld and web.xml files and the rest of the error:
======== app.tld ================
<tag>
<name>hello</name>
<tagclass>HelloTag</tagclass>
<bodycontent>empty</bodycontent>
</tag>
======== web.xml ================
<taglib>
<taglib-uri>/WEB-INF/app.tld</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
======== error message ================
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 14 in the jsp file: /bid.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
HelloTag _jspx_th_app_hello_0 = new HelloTag();
^
An error occurred at line: 14 in the jsp file: /bid.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
HelloTag _jspx_th_app_hello_0 = new HelloTag();
^
2 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:177)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java,
Compiled Code)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java,
Compiled Code)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java,
Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)
----------------------------------------------------------------------------
----
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cannot find tag library
Posted by Elijah Jacobs <el...@hotmail.com>.
Thanks Max,
that worked great.
- ej
----- Original Message -----
From: "Max Cooper" <ma...@maxcooper.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, February 04, 2002 3:34 PM
Subject: Re: cannot find tag library
> Elijah,
>
> Try giving your tag handler class a proper package name and put that in
the
> app.tld file.
>
> -Max
>
> ----- Original Message -----
> From: "Elijah Jacobs" <el...@hotmail.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, February 04, 2002 8:33 AM
> Subject: cannot find tag library
>
>
> > Hi all,
> >
> > I am using Tomcat 4.01; Windows 2000 ; Struts v1.0
> >
> > I created a tag which displays a message on the screen. I followed the
> > basic layout of the example that came with struts. by "layout" I mean:
> >
> > 1. I created a tag under the /classes directory. this time I put it
right
> > under the /classes directory so I didn't need to deal with package
names.
> > 2. I added the tag in the app.tld (which is right under /web-inf)
> > 3. On my jsp page, I reference the TLD file and gave it a prefix "app"
> (just
> > like the example).
> > <%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>
> >
> >
> > when I do " <app:hello /> " in my JSP page (Bid.jsp) I get:
> >
> > Generated servlet error:
> > C:\Program Files\Apache Tomcat
4.0\work\localhost\blank\bid$jsp.java:143:
> > Class org.apache.jsp.HelloTag not found.
> > HelloTag _jspx_th_app_hello_0 = new HelloTag();
> > ^
> >
> > I am not sure why it's looking for my HelloTag under org.apache.jsp when
I
> > put it on the /classes directory. I have other Java files right under
the
> > /classes directory and Tomcat 4.0.1 was able to find them - although
they
> > were not custom tag file, but that shouldn't matter, right?
> >
> > thanks in advance,
> > - ej -
> (SNIP)
>
>
> --
> To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@jakarta.apache.o
rg>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cannot find tag library
Posted by Max Cooper <ma...@maxcooper.com>.
Elijah,
Try giving your tag handler class a proper package name and put that in the
app.tld file.
-Max
----- Original Message -----
From: "Elijah Jacobs" <el...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, February 04, 2002 8:33 AM
Subject: cannot find tag library
> Hi all,
>
> I am using Tomcat 4.01; Windows 2000 ; Struts v1.0
>
> I created a tag which displays a message on the screen. I followed the
> basic layout of the example that came with struts. by "layout" I mean:
>
> 1. I created a tag under the /classes directory. this time I put it right
> under the /classes directory so I didn't need to deal with package names.
> 2. I added the tag in the app.tld (which is right under /web-inf)
> 3. On my jsp page, I reference the TLD file and gave it a prefix "app"
(just
> like the example).
> <%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>
>
>
> when I do " <app:hello /> " in my JSP page (Bid.jsp) I get:
>
> Generated servlet error:
> C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
> Class org.apache.jsp.HelloTag not found.
> HelloTag _jspx_th_app_hello_0 = new HelloTag();
> ^
>
> I am not sure why it's looking for my HelloTag under org.apache.jsp when I
> put it on the /classes directory. I have other Java files right under the
> /classes directory and Tomcat 4.0.1 was able to find them - although they
> were not custom tag file, but that shouldn't matter, right?
>
> thanks in advance,
> - ej -
(SNIP)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>