tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wadkin <j.wad...@hud.ac.uk>
Subject RE: web.xml Question
Date Tue, 22 Jan 2002 11:42:52 GMT
I'm no expert on XML, but I do write documents in XML which are then
parsed/interpreted by a servlet (which I didn't write).

As far as I know, any XML document will parse without a DTD. A DTD just
provides the syntax - e.g. tag names, tag attributes, tag structures (list
of tags that a tag can contain). Without a DTD, the document is just checked
for "well-formedness" - e.g. that all start tags have an end tag. It should
be possible to store the web.xml DTD locally and modify the identifier to
point to it. Don't ask me what the syntax of the identifier is - all I know
is that it's different for DTDs that are local! Look in a good XML book
(e.g. New Riders, Inside XML).

I guess that having the DTD locally would also help when creating server.xml
and web.xml files: you'd be able to use an XML editor with the DTD and
therefore guarantee that all your <service>, <engine>, etc. tags where in
the right order, with the right attributes.

Thanks,
 
John
 
Quote for the week:
 
The men with the muck-rakes are often indispensable to the well-being of
society; but only if they know when to stop raking the muck.
 
Theodore Roosevelt, Speech in New York, 11 Nov. 1902
 


-----Original Message-----
From: Tom Bednarz [mailto:list@bednarz.ch]
Sent: 22 January 2002 07:49
To: tomcat-user@jakarta.apache.org
Subject: web.xml Question


Hi everybody,

Usually the web.xml file of a web application starts with the following:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd">

This URL referst to the dtd file on SUN's server. I think most XML parsers 
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access 
to the internet only through a proxy server (with username / password 
authentication)? The dtd cannot be accessed and must be someware on the 
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody 
explain me, which XML files I need to change and where do I need to put the 
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like 
a parent to all web.xml files found under webapps\<application>\WEB-INF? 
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message