tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <>
Subject RE: Tomcat 3.1 tag problem
Date Thu, 25 May 2000 12:43:00 GMT
Your error is coming from the parser while validating the XML in web.xml.  Evidently validation
isn't occurring until taglib usage occurs.  The web.dtd contains:
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, servlet*, servlet-mapping*, session-config?,
mime-mapping*, welcome-file-list?, error-page*, taglib*,
resource-ref*, security-constraint*, login-config?, security-role*,
env-entry*, ejb-ref*)>
Because the list following "web-app" is enclosed within parentheses, these elements MUST appear
in the specified order.  For example, if you put your "<taglib>" entry before any "<servlet>"
entries,  you could get the error you are seeing.
Hope this helps.

-----Original Message-----
From: Luc Margaron []
Sent: Thursday, May 25, 2000 3:21 AM
Subject: Tomcat 3.1 tag problem


I use Tomcat 3.1 and I cannot make the tag work 

In my web.xml I have the entry 

        <taglib-uri> http://luc/taglib <http://luc/taglib> </taglib-uri>


I have the tag classes in /WEB-INF/classes 

my file taglib.tld is in /WEB-INF/tgld/taglib.tld 

in  Hello.jsp I have : 

<%@ taglib uri=" http://luc/taglib <http://luc/taglib> " prefix="mt" %> 
       <TITLE> Hello World! </TITLE> 

when I execute Hello.jsp I have the following error: 

       Location: /goodies/jsp/HelloTag.jsp 

Internal Servlet Error: 

org.apache.jasper.JasperException: Unable to open taglibrary http://luc/taglib <http://luc/taglib>
 : Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here.

        at org.apache.jasper.compiler.JspParseEventListener.handleDirective(

        at org.apache.jasper.compiler.DelegatingListener.handleDirective(

        at org.apache.jasper.compiler.Parser$Directive.accept( 
        at org.apache.jasper.compiler.Parser.parse( 
        at org.apache.jasper.compiler.Parser.parse( 
        at org.apache.jasper.compiler.Parser.parse( 
        at org.apache.jasper.compiler.Compiler.compile( 
        at org.apache.jasper.runtime.JspServlet.loadJSP( 
        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(

        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(

        at org.apache.jasper.runtime.JspServlet.serviceJspFile( 
        at org.apache.jasper.runtime.JspServlet.service( 
        at javax.servlet.http.HttpServlet.service( 
        at org.apache.tomcat.core.ServletWrapper.handleRequest( 
        at org.apache.tomcat.core.ContextManager.service( 
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(


If I remove the taglib entry in web.xml I get the same error 

Any idea ? 


Luc Margaron

Metrix Development

Tel   : (+33) 4 92 94 24 17

Fax   : (+33) 4 92 94 24 91

View raw message