Hi,

Bob Bronson wrote:
Hello,

Sorry, to bother the developer group with this question but I posted twice on the user group and received zero replies. I was hoping one of you could offer some quick advice on this question.
---------------------------------
I'm using TC 5.5.12.
Please look at this snippet from the server.xml that is distributed
with TC:

 <!-- Define the default virtual host
       Note: XML Schema validation will not work with Xerces 2.2.
   -->
  <Host name="localhost" appBase="webapps"
   unpackWARs="true" autoDeploy="true"
   xmlValidation="false" xmlNamespaceAware="false">


Can anyone tell me what the 'xmlValidation' attribute on <Host> is for?
I realize it has something to do with "XML validation", but what XML is
it referring to? Is it the corresponding web.xml?

Yes it is.

And how does the
'xmlNamespaceAware' attribute fit in?

You can decide to validate with or without namespace.


And what's the comment about the Xerces 2.2 parser?

For a long time, Xerces was broken/buggy when used in Tomcat.

'm using Sun's JDK
1.5.0. Does it use Xerces internally?

Yes it does.



When I set the 'xmlValidation' attribute to 'true' I get a big stack
trace. One would think it might be appropriate to offer a nice error
message describing the problem.

Blame Xerces ;-). XML error are not always easy to discover.


I've looked at the latest TC documentation for <Host> and it makes no
mention of the 'xmlValidation' attribute:
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html

That's a problem. I will take a look.


Can someone please explain these two attributes? My web.xml is getting
unwieldy and I'd like to start validating it.

In short, set those two values to true. If you are seeing exception, then it means your web.xml is not properly written. Try using Netbeans/Eclipse (or any IDE). It is much more easy.

-- Jeanfrancois


Thanks very much.

--
Bob Bronson





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to