Thank you!!! It works!!! =) =) =)
-alex
--- Jann VanOver <[EMAIL PROTECTED]> wrote:
> You said:
>
> My HelloTag.java is in the main onjava/ directory;
> I compiled it with: javac -d WEB-INF\lib HelloTag.java
>
> next time, try javac -d WEB-INF\classes HelloTag.java !!!
>
> It created the com/onjava/ directories. I thought
> nothing of it since HelloTag is in the package
> com.onjava. Should I move HelloTag.class out of
> the /WEB-INF/lib/com/onjava directory and right
> into the /WEB-INF/lib directory?
>
> Almost right! If you have .class files, they must go in
> WEB-INF/classes/com/onjava
> If your class files are combined into a .jar file, they may be put into
> WEB-INF/lib
>
> You are very close, alex!
>
> -----Original Message-----
> From: alex chang [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error: 500
>
>
> Hi,
>
> I made sure to double check everything before
> I wrote here (I also just signed up and wrote
> to the taglibs-user group).
>
> My directory structure is like this:
>
> onjava/
> +- images/
> +- WEB-INF/
> +- classes/
> +- com/
> +- onjava/
> +- lib/
> +- com/
> +- onjava/
>
> My HelloTag.java is in the main onjava/ directory;
> I compiled it with: javac -d WEB-INF\lib HelloTag.java
>
> It created the com/onjava/ directories. I thought
> nothing of it since HelloTag is in the package
> com.onjava. Should I move HelloTag.class out of
> the /WEB-INF/lib/com/onjava directory and right
> into the /WEB-INF/lib directory?
>
> This was the only part I wasn't positive on since
> the instructions said to put it in the lib directory.
>
> Thanks for your help and patience,
> -alex
>
> --- Jann VanOver <[EMAIL PROTECTED]> wrote:
> > Yes, that makes perfect sense. The error message you got was "Unable
> to
> > load class com.onjava.HelloTag" so of course you would only see the
> > error
> > when you try to use that tag.
> >
> > Did you follow all the instructions at the end of step 4? You have to
> > create and compile HelloTag.java and then put the class file in the
> > right
> > place, then describe the tag in the .tld file. If any of these things
> > aren't done right, it won't be able to find the class when you need
> it.
> > Re-check your steps.
> >
> > -----Original Message-----
> > From: alex chang [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 12:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Error: 500
> >
> >
> > Hi Jann, thanks for replying.
> > It does work with the jsp from step 4 as you've
> > said, where it simply prints the word "Welcome".
> >
> > But it still doesn't work with the modified jsp
> > page, where I have the taglib directive up top
> > and replace the word "Welcome" with the
> > <onjava:hello />.
> >
> > I've done some more checks and it seems I only
> > get the error when I have the <onjava:hello />
> > tag. That is, if I simply have the taglib directive
> > and no <onjava:hello /> tag, it works. But if I
> > put that <onjava:hello /> tag back in, I get the
> > error.
> >
> > Any more ideas?
> > Thanks,
> > -alex
> >
> > --- Jann VanOver <[EMAIL PROTECTED]> wrote:
> > > It looks like you were doing step 4 with the JSP from step 5. This
> > code
> > > won't work until after you've created and compiled the tag library,
> > > which
> > > you haven't done yet if you're working in order. Try it with the
> JSP
> > > code
> > > from "Listing 3" and you shouldn't get this error.
> > >
> > > -----Original Message-----
> > > From: alex chang [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 26, 2001 6:25 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Error: 500
> > >
> > >
> > > I've been following this little tutorial:
> > > http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
> > >
> > > I'm up to the part of Adding Tag Libraries,
> > > on page 4. So far, everything except this part
> > > has worked. I get an HTTP 500 internal server
> > > error. Here are the first four lines of that:
> > >
> > > 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,10) Unable to
> > > load
> > > class com.onjava.HelloTag
> > >
> > > I was wondering if anyone who has tried this
> > > example also can help me out. Thanks..
> > >
> > > -alex
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/