Sajeev Anand wrote:
>
> Sure, only that it involves the code, but this is only a Hello World
> program.
>

> My tag class: HelloTag.java
> ---------------------------
> import java.io.*;
> import javax.servlet.jsp.*;
> import javax.servlet.jsp.tagext.*;
>
> public class HelloTag extends TagSupport  {

One thing missing which could make problems is that HelloTag class
doesn't belong to any package. I've read somewhere that it's much easier
for servlet container to find appropriate classes when they are in
packages. So, I'd suggest changing HelloTag, so that it belongs to "any
name" package.

>         <tag>
>                 <name>hello</name>
>                 <tagClass>HelloTag</tagClass>
>         </tag>

Then put the compiled class into WEB-INF/classes directory and make
necessary changes in TLD.

Let's say it'd be in "message" package, so the entry in TLD should be:

  <tag>
    <name>hello</name>
    <tagclass>message.HelloTag</tag-class>
  </tag>

Another one, I've just noticed is that the tag which describes tag's
class should be written all lowercases - <tagclass> - as they are
case-sensitive.

> Sajeev

Jacek Laskowski

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to