tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex chang <shortestp...@yahoo.com>
Subject Re: tag not working
Date Wed, 27 Jun 2001 03:19:02 GMT
Hi Jeff,

Yes I had that in my web.xml. Actually someone
from the tomcat-users group helped me fix the 
problem. 

>From my WEB-INF directory, I was doing this:
javac -d WEB-INF\lib HelloTag.java

The tutorial said to put the compiled library
(from HelloTag.java) and the taglib.tld into
the lib directory. 

What I should've done was this:
javac -d WEB-INF\classes HelloTag.java

I finally did that and everything worked ok.
Thanks,
-alex

--- Jeff Marin <jefmarin@pacbell.net> wrote:
> Are you sure that the following appears in your web.xml:
> 
> <taglib>
>   <taglib-uri>/onjava</taglib-uri>
>   <taglib-location>/WEB-INF/lib/taglib.tld</taglib-location>
> </taglib>
> 
> 
> ----- Original Message ----- 
> From: "alex chang" <shortestpath@yahoo.com>
> To: <taglibs-user@jakarta.apache.org>
> Sent: Tuesday, June 26, 2001 12:46 PM
> Subject: tag not working
> 
> 
> > I've been following a tutorial:
> > http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html
> > 
> > My problem begins with the section "Adding Tag Libraries".
> > I'm using Tomcat 3.3m3 and Windows 2000.
> > 
> > I have the taglib.tld in the /WEB-INF/lib directory and 
> > the HelloTag.class in the /WEB-INF/lib/com/onjava directory.
> > 
> > I've modified my welcome.jsp to include 
> > <%@ taglib uri="/onjava" prefix="onjava" %>
> > at the top and use the <onjava:hello /> tag
> > further down the page. When I try to bring up
> > this page, I get the following error:
> > 
> > Error: 500
> > Location: /onjava/welcome.jsp
> > Internal Servlet Error:
> > 
> > org.apache.jasper.compiler.CompileException:
> > C:\jakarta-tomcat-3.3-m3\webapps\onjava\welcome.jsp(11,11) Unable to
> load
> > class com.onjava.HelloTag
> > 
> > These are only the first four lines of it. 
> > I've done some testing and it seems I only 
> > get this error when I have my <onjava:hello />
> > tag in there (in my welcome.jsp). That is,
> > if I simply have the 
> > 
> > <%@ taglib uri="/onjava" prefix="onjava" %>
> > 
> > directive at the top, and leave out the 
> > <onjava:hello />, The page comes up fine 
> > (except that it doesn't print what would've
> > been printed by the tag of course). Once
> > I put the <onjava:hello /> back in, I get
> > the error. 
> > 
> > Can anyone who has done this example or who
> > knows what I'm talking about help me?
> > 
> > Thanks in advance!
> > -alex
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Mime
View raw message