tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn Atter" <gat...@oxmol.co.uk>
Subject Re: Problems with tag libraries
Date Tue, 09 Nov 1999 11:16:22 GMT
Hi Folks,

I have been looking into creating a simple tag to define a database
connection. Unfortunately, I have come across a problem that I am finding
difficult to solve. If I do not use my 'connection' tag, the jsp file
compiles and runs without any problems; however, if I use my 'connection'
tag I get the following error message in the browser:

----------------------------------------------------------------------------
-------------------------
Error: 500
(class: jsp/simpletag/_0005cjsp_0005csimpletag_0005cfoo_0002ejspfoo_jsp_1,
method: _jspService signature:
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
nse;)V) Illegal exception table range
----------------------------------------------------------------------------
-------------------------

and the following message on stdout

----------------------------------------------------------------------------
-------------------------
Unhandled error! You might want to consider having an error page to report
such errors more gracefully
java.lang.VerifyError: (class:
jsp/simpletag/_0005cjsp_0005csimpletag_0005cfoo_0002ejspfoo_jsp_0, method:
_jspService signature:
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
nse;)V) Illegal exception table range
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Unknown Source)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.load(JspServlet.java:
109)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:143)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:153)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:239)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:343)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:868)
        at
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:6
24)
        at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:5
32)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:376)
        at org.apache.tomcat.core.Context.handleRequest(Context.java:640)
        at
org.apache.tomcat.server.ConnectionHandler.run(ConnectionHandler.java:209)
----------------------------------------------------------------------------
-------------------------

I have tried to figure out why this error occurs. One thing I am noticing is
that the .java file that is created from the jsp file is defined to belong
to the jsp.simpletag package. Based on this I would expect the class file to
be created in the jsp/simpletag directory. This does not occur, even though
the jsp/simpletag directory is created upon compilation the class file still
resides in the top-level classpath, in my case work/8080%2Fexamples. (I also
noticed that 8080%2Fexamples is the URLencoded version of 8080/examples, is
this correct?)

I have included the necessary files that are required to reproduce this
problem (I am running on winNT with JDK1.2.2).

The ConnectionTag.class and the ConnectionTagExtraInfo.class need to be
placed in build\tomcat\examples\WEB-INF\classes\examples
The example-taglib.tld replaces the standard one in
build\tomcat\examples\WEB-INF\jsp
The foo.jsp replaces the standard one in
\build\tomcat\examples\jsp\simpletag

If anyone could give me a few pointers I could try and solve this problem
myself.

Thanks

Glenn

Mime
View raw message