You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by yilmaz <yi...@hwajet.com.tw> on 2001/12/26 04:18:29 UTC

the order of the tags in web.xml file

Hi all, can anyone tell me where i can find a piece of doc about
the order of the tags in a web.xml file. For a while i have been trying
to use different combinations of those tags but still i couldn't figure out
the right order. I searched archives, FAQs , even
http://java.sun.com/dtd/web-app_2_3.dtd  but couldn't  find anything about
that.
how are we supposed to know the correct order of those tags? Without that,
i can't get my tomcat 4 server worked.
Let me make my problem more clear:
i want to set some security constraints on my directories,so i need to set
<security-constraints> tags, but whenever i try i am having parsing
exceptions due
to inproper ordering of those tags. In a more straightforward saying,
where should <security-constraints> tags be put, before -or -after mime
types,
 sesion-config,login config, etc.
Please help me as soon as possible.
Best Regards :)



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: the order of the tags in web.xml file

Posted by yilmaz <yi...@hwajet.com.tw>.
Thank you Craig, i knew that it should be in DTD, but somewhat i couldn't
find, may be that time i didn't know how to read :).
However, i found it now, thanks for your help.
Cheers :)
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, December 27, 2001 2:55 AM
Subject: Re: the order of the tags in web.xml file


>
>
> On Wed, 26 Dec 2001, yilmaz wrote:
>
> > Date: Wed, 26 Dec 2001 11:18:29 +0800
> > From: yilmaz <yi...@hwajet.com.tw>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: the order of the tags in web.xml file
> >
> > Hi all, can anyone tell me where i can find a piece of doc about
> > the order of the tags in a web.xml file. For a while i have been trying
> > to use different combinations of those tags but still i couldn't figure
out
> > the right order. I searched archives, FAQs , even
> > http://java.sun.com/dtd/web-app_2_3.dtd  but couldn't  find anything
about
> > that.
> > how are we supposed to know the correct order of those tags? Without
that,
> > i can't get my tomcat 4 server worked.
> > Let me make my problem more clear:
> > i want to set some security constraints on my directories,so i need to
set
> > <security-constraints> tags, but whenever i try i am having parsing
> > exceptions due
> > to inproper ordering of those tags. In a more straightforward saying,
> > where should <security-constraints> tags be put, before -or -after mime
> > types,
> >  sesion-config,login config, etc.
> > Please help me as soon as possible.
> > Best Regards :)
> >
> >
>
> The DTD *does* tell you exactly what the required order is ... but you do
> have to know how to read it :-)
>
> Near the top of the DTD, you will see the following definition for the
> <web-app> element:
>
>   <!ELEMENT web-app (icon?, display-name?, description?, ...
>
> which defines exactly the required order, as well as whether an element
> is optional ("?" suffix) or can occur zero or more times ("*" suffix).
> The same is true for elements with nested sub-elements like <servlet>.
>
> For those that are interested, the detailed syntax and semantics of an XML
> DTD are defined in the XML Specification at <http://www.w3c.org>.
>
> Craig McClanahan
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: the order of the tags in web.xml file

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 26 Dec 2001, yilmaz wrote:

> Date: Wed, 26 Dec 2001 11:18:29 +0800
> From: yilmaz <yi...@hwajet.com.tw>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: the order of the tags in web.xml file
>
> Hi all, can anyone tell me where i can find a piece of doc about
> the order of the tags in a web.xml file. For a while i have been trying
> to use different combinations of those tags but still i couldn't figure out
> the right order. I searched archives, FAQs , even
> http://java.sun.com/dtd/web-app_2_3.dtd  but couldn't  find anything about
> that.
> how are we supposed to know the correct order of those tags? Without that,
> i can't get my tomcat 4 server worked.
> Let me make my problem more clear:
> i want to set some security constraints on my directories,so i need to set
> <security-constraints> tags, but whenever i try i am having parsing
> exceptions due
> to inproper ordering of those tags. In a more straightforward saying,
> where should <security-constraints> tags be put, before -or -after mime
> types,
>  sesion-config,login config, etc.
> Please help me as soon as possible.
> Best Regards :)
>
>

The DTD *does* tell you exactly what the required order is ... but you do
have to know how to read it :-)

Near the top of the DTD, you will see the following definition for the
<web-app> element:

  <!ELEMENT web-app (icon?, display-name?, description?, ...

which defines exactly the required order, as well as whether an element
is optional ("?" suffix) or can occur zero or more times ("*" suffix).
The same is true for elements with nested sub-elements like <servlet>.

For those that are interested, the detailed syntax and semantics of an XML
DTD are defined in the XML Specification at <http://www.w3c.org>.

Craig McClanahan



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>