Discussions

Web tier: servlets, JSP, Web frameworks: custom tag problem

  1. custom tag problem (2 messages)

    I'm trying to write simple custom tag in my jsp
    i got following error

    org.apache.jasper.JasperException: Unable to compile class for JSP

    An error occurred at line: 5 in the jsp file: /myjsp.jsp

    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\StrutsShop\myjsp$jsp.java:63: Class org.apache.jsp.MyTagHandler not found.
    MyTagHandler _jspx_th_my_simple_0 = new MyTagHandler();
    ^


    An error occurred at line: 5 in the jsp file: /myjsp.jsp

    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\StrutsShop\myjsp$jsp.java:63: Class org.apache.jsp.MyTagHandler not found.
    MyTagHandler _jspx_th_my_simple_0 = new MyTagHandler();
    ^

    Everything else in descriptors is fine, i double checked them
    is there any specific reason to get this kind of error???

    Please help me
    thanks in advance

    Threaded Messages (2)

  2. Additional Information Needed.[ Go to top ]

    Can you provide the section of your TLD for this tag, where you have the TLD located (i.e. directory placement within the app), the taglib directive from your jsp and the section of code from the jsp that calls the tag?

    It should be easy to find from there...
  3. custom tag problem[ Go to top ]

    It sounds like your custom tag handler class is not in the web application's classpath. It should be in the WEB-INF/classes directory or in a jar in the WEB-INF/lib directory. If you tag handler class is in the classpath, maybe you have the class or package name misspelled in the TLD.