You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Smith, David" <Da...@ArtesiaTech.com> on 2000/07/21 19:38:21 UTC

question about what this error means...

i was wondering if anyone could tell me what the following error message
means (below is the stack trace). i have the page directive <%@ taglib
uri="teamsi18n.tld" prefix="TEAMSi18n" %> in my JSP, and the file
"teamsi18n.tld" exists in the same directory as the JSP.

i'm just wondering how to interpret the error that occurs -- i was thinking
that it maybe couldn't find the "teamsi18n.tld" file, but i don't see how
that could be the case. here's the stack trace:

org.apache.jasper.JasperException: Could not locate TLD META-INF/taglib.tld
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoIm
pl.java:209)
        at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspP
arseEventListener.java:648)
        at
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegat
ingListener.java:110)
        at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:198)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:1027)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:1002)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:998)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:154)
        at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:226)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessar
y(JspServlet.java:137)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSer
vlet.java:148)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:2
55)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:360)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:868)

any help is greatly appreciated! thanks very much.
david

Re: question about what this error means...

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Jeff Ward wrote:
> 
> the tld file has to be in your (webroot)/WEB-INF directory (it may be
> META-INF in apachee). So putting it in the same directory as the JSP doesn't
> work.

It should work according to the specification, so if it doesn't it's a bug
in Tomcat. Did you test this with the latest nightly build?

The JSP specification (and the errata document) describes how the TLD
is located. Basically, there are three options for the taglib directive
uri attribute:

1) <%@ taglib uri="foo.tld" prefix="xxx" %>
   The uri value doesn't start with a slash so it's interpreted as a
   path relative to the JSP page. In this example it must be located
   in the same directory.

2) <%@ taglib uri="/WEB-INF/tlds/foo.tld" prefix="xxx" %>
   The uri value starts with a slash so it's interpreted as a context-
   relative path. In this example it's located in the WEB-INF/tlds
   subdirectory for the web application.

3) <%@ taglib uri="/WEB-INF/lib/foo.jar" prefix="xxx" %>
   The uri value is a JAR file path, which could be with or without a
   slash as in 1) and 2). The TLD must be located in the META-INF/taglib.tld
   in the JAR file. I don't think Tomcat 3.1 and 3.2 Beta 2 supports this
   yet.

4) <%@ taglib uri="/someName" prefix="xxx" %>
   The uri value is a symbolic name that is defined in the web.xml file
   by a <taglib> elements. The location is defined by the <taglib-location>
   subelement, using the same type of values as described for the uri
   attribute in 1) through 3).

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Re: Question regarding error: Response has already been committed

Posted by Justyna Horwat <Ju...@eng.sun.com>.
You can get an IllegalStateException when you attempt to grab the output
stream after something else has written to it.

For example if you use jsp:include, the outer jsp has already called
getWriter()
on the response object, the inner jsp will get an IllegalStateException if
it
calls getOutputStream() on the same response object.

Justyna
< horwat@eng.sun.com >

----- Original Message -----
From: "Jason Shaffer" <ja...@theprairie.com>
To: <ta...@jakarta.apache.org>
Sent: Friday, July 21, 2000 12:46 PM
Subject: Question regarding error: Response has already been committed


> I receive the following error when I attempt to load Apply.jsp of the xsl
> example that comes with the jakarta-taglibs nightly build. The jsp page
> loads fine until it comes to the first taglib tag, and then the error
> occurs. Any suggestions? Thanks.
>
> ~Jason
>
> Error: 500
> Location: /examples/jsp/Apply.jsp
> Internal Servlet Error:
>
> java.lang.IllegalStateException: Response has already been committed
> at
>
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletRespon
> seFacade.java:157)
> at
> org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
> at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:160)
> at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
> )
> at java.lang.Thread.run(Unknown Source)
>
>


Question regarding error: Response has already been committed

Posted by Jason Shaffer <ja...@theprairie.com>.
I receive the following error when I attempt to load Apply.jsp of the xsl
example that comes with the jakarta-taglibs nightly build. The jsp page
loads fine until it comes to the first taglib tag, and then the error
occurs. Any suggestions? Thanks.

~Jason

Error: 500
Location: /examples/jsp/Apply.jsp
Internal Servlet Error:

java.lang.IllegalStateException: Response has already been committed
	at
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletRespon
seFacade.java:157)
	at
org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
	at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
	at java.lang.Thread.run(Unknown Source)


RE: question about what this error means...

Posted by Jeff Ward <jw...@benefitpoint.com>.
the tld file has to be in your (webroot)/WEB-INF directory (it may be
META-INF in apachee). So putting it in the same directory as the JSP doesn't
work.
    -Jeff

-----Original Message-----
From: Smith, David [mailto:David.Smith@ArtesiaTech.com]
Sent: Friday, July 21, 2000 10:38 AM
To: 'taglibs-user@jakarta.apache.org'
Subject: question about what this error means...


i was wondering if anyone could tell me what the following error message
means (below is the stack trace). i have the page directive <%@ taglib
uri="teamsi18n.tld" prefix="TEAMSi18n" %> in my JSP, and the file
"teamsi18n.tld" exists in the same directory as the JSP.

i'm just wondering how to interpret the error that occurs -- i was thinking
that it maybe couldn't find the "teamsi18n.tld" file, but i don't see how
that could be the case. here's the stack trace:

org.apache.jasper.JasperException: Could not locate TLD META-INF/taglib.tld
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoIm
pl.java:209)
        at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspP
arseEventListener.java:648)
        at
org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegat
ingListener.java:110)
        at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:198)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:1027)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:1002)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:998)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:154)
        at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:226)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessar
y(JspServlet.java:137)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSer
vlet.java:148)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:2
55)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:360)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:868)

any help is greatly appreciated! thanks very much.
david