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 Ingmar Stein <In...@digital-phenomenon.com> on 2001/11/14 22:47:09 UTC
web.xml problems
Hi all,
what is the problem with the following file?
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- general description -->
<display-name>xfiles</display-name>
<description>The xfiles</description>
<!-- include dbtags taglib -->
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/dbtags</taglib-uri>
<taglib-location>/WEB-INF/dbtags.tld</taglib-location>
</taglib>
<!-- set database parameters -->
<context-param>
<param-name>db_url</param-name>
<param-value>jdbc:mysql://bender/xfiles</param-value>
<description>DB URL</description>
</context-param>
</web-app>
Tomcat reports:
Parse error in application web.xml
org.xml.sax.SAXParseException: The content of element type "web-app"
must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*
,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim
e-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,e
jb-ref*,ejb-local-ref*)".
Cheers,
Ingmar
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml problems
Posted by ma...@tumbleweed.com.
The error message tells you exactly what's wrong with it!
The <taglib> entry must come after the <context-param> entry. You can see
this by reading the error message you got, which lists exactly what the
web.xml file can contain, and in what order.
--
Martin Cooper
----- Original Message -----
From: "Ingmar Stein" <In...@digital-phenomenon.com>
To: <ta...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 1:47 PM
Subject: web.xml problems
> Hi all,
>
> what is the problem with the following file?
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <!-- general description -->
> <display-name>xfiles</display-name>
> <description>The xfiles</description>
>
> <!-- include dbtags taglib -->
> <taglib>
>
> <taglib-uri>http://jakarta.apache.org/taglibs/dbtags</taglib-uri>
> <taglib-location>/WEB-INF/dbtags.tld</taglib-location>
> </taglib>
>
> <!-- set database parameters -->
> <context-param>
> <param-name>db_url</param-name>
> <param-value>jdbc:mysql://bender/xfiles</param-value>
> <description>DB URL</description>
> </context-param>
> </web-app>
>
> Tomcat reports:
>
> Parse error in application web.xml
> org.xml.sax.SAXParseException: The content of element type "web-app"
> must match
> "(icon?,display-name?,description?,distributable?,context-param*,filter*
> ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim
> e-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
> urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,e
> jb-ref*,ejb-local-ref*)".
>
> Cheers,
>
> Ingmar
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml problems
Posted by "P.Miller" <p....@brocom.de>.
Hello,
if I'm right the taglib-uri can be set to whatever you like, it has only
to be the same in the
tld-file, the web.xml and the uri-directive in the jsp-file.
You could take uri = "xyz" and it should work!
Peter
Nick Pellow wrote:
>
> Ingmar ,
> Well, the taglib uri you have is not correct:
> http://jakarta.apache.org/taglibs/dbtags
>
> This should be the uri your jsps will reference when defining
> a taglib. Not the jakarta taglibs home page!
>
> Hope this helps,
>
> Nick
>
> ----- Original Message -----
> From: "Ingmar Stein" <In...@digital-phenomenon.com>
> To: <ta...@jakarta.apache.org>
> Sent: Thursday, November 15, 2001 8:47 AM
> Subject: web.xml problems
>
> > Hi all,
> >
> > what is the problem with the following file?
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> > 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> > <web-app>
> > <!-- general description -->
> > <display-name>xfiles</display-name>
> > <description>The xfiles</description>
> >
> > <!-- include dbtags taglib -->
> > <taglib>
> >
> > <taglib-uri>http://jakarta.apache.org/taglibs/dbtags</taglib-uri>
> > <taglib-location>/WEB-INF/dbtags.tld</taglib-location>
> > </taglib>
> >
> > <!-- set database parameters -->
> > <context-param>
> > <param-name>db_url</param-name>
> > <param-value>jdbc:mysql://bender/xfiles</param-value>
> > <description>DB URL</description>
> > </context-param>
> > </web-app>
> >
> > Tomcat reports:
> >
> > Parse error in application web.xml
> > org.xml.sax.SAXParseException: The content of element type "web-app"
> > must match
> > "(icon?,display-name?,description?,distributable?,context-param*,filter*
> > ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim
> > e-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
> > urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,e
> > jb-ref*,ejb-local-ref*)".
> >
> > Cheers,
> >
> > Ingmar
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: web.xml problems
Posted by Nick Pellow <ni...@cortexebusiness.com.au>.
Ingmar ,
Well, the taglib uri you have is not correct:
http://jakarta.apache.org/taglibs/dbtags
This should be the uri your jsps will reference when defining
a taglib. Not the jakarta taglibs home page!
Hope this helps,
Nick
----- Original Message -----
From: "Ingmar Stein" <In...@digital-phenomenon.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, November 15, 2001 8:47 AM
Subject: web.xml problems
> Hi all,
>
> what is the problem with the following file?
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <!-- general description -->
> <display-name>xfiles</display-name>
> <description>The xfiles</description>
>
> <!-- include dbtags taglib -->
> <taglib>
>
> <taglib-uri>http://jakarta.apache.org/taglibs/dbtags</taglib-uri>
> <taglib-location>/WEB-INF/dbtags.tld</taglib-location>
> </taglib>
>
> <!-- set database parameters -->
> <context-param>
> <param-name>db_url</param-name>
> <param-value>jdbc:mysql://bender/xfiles</param-value>
> <description>DB URL</description>
> </context-param>
> </web-app>
>
> Tomcat reports:
>
> Parse error in application web.xml
> org.xml.sax.SAXParseException: The content of element type "web-app"
> must match
> "(icon?,display-name?,description?,distributable?,context-param*,filter*
> ,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mim
> e-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,reso
> urce-ref*,security-constraint*,login-config?,security-role*,env-entry*,e
> jb-ref*,ejb-local-ref*)".
>
> Cheers,
>
> Ingmar
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>