tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yang,Chun" <ya...@omrsystems.com>
Subject re:unable to open tag library
Date Wed, 24 Jan 2001 22:20:42 GMT
Hello All,

About a week ago I posted to this mailing list a question regarding a JSP
page being unable to open a tag library. I have since received tremendous
amount of help from Mr. Pierre Delisle with Sun Microsystems to pin point
and solve the problem. Here is a brief summary on the case:

JSP page requests for a customized tag <hw> which has the following entry in
web.xml:

========================================
<taglib>
        <taglib-uri>
           /xyz
        </taglib-uri>
        <taglib-location>
           /Web-inf/taglib/test-taglib.tld
        </taglib-location>
    </taglib>
========================================

and the following entry in test-taglib.tld:

------------------------------------------------------------

<tag>
      <name>hw</name>
      <tagclass>foo.class</tagclass>
      <bodycontent>empty</bodycontent>
      <info>
      </info>
  </tag>

------------------------------------------------------------

Jasper error message upon requesting the page is:

	> Internal Servlet Error:
	> org.apache.jasper.compiler.CompileException:
	> <JSP page name>(0,0) Unable to open taglibrary > /xyz: null

The error was incurred due to the fact that I had "Web-inf" as the directory
name on my pc whereas "WEB-INF" is what's called for by the JSP spec.  After
making changes to the dir name in both web.xml and in the OS, the JSP page
executed as expected.

One lesson that I have learned from this is: read the JSP spec not once, not
twice, but three times, four times...... The more the better! :-)

Special thanks go to Pierre for his patience and help!

Happy coding!

Mime
View raw message