XML in Tomcat

J

Juan

Hi,

Does anyone know how to configure the XML catalog in Tomcat to
avoid loading remote DTD's everytime a XML file is parsed ? I've been
reading the docs at apache.org without success.

Any hint would be really welcome.

Thanks in advance,

- Juan
 
H

Harry Bosch

Hmm, I am trying to remember this issue. I had it once, a long time
ago when I was working behind a proxy and couldn't test my freakin'
code because both weblogic and tomcat wanted to validate my docs.

But, alas I don't remember how you turn it off! It's a SAX feature
(part of the api) that you can turn on and off in code, and I believe
as a property in some file in your classpath.

Here is a starting point... I'll keep looking.
http://xml.apache.org/xerces-j/features.html
 
H

Harry Bosch

Well, I really can't think of if I actually "Fixed" the problem or just
went ahead and changed the xml file to reference a local copy and not
the remote copy... I found a discussion about this sort of issue here:
http://www.mail-archive.com/[email protected]/msg03510.html


I seem to recall this also has a problem while I was using ANT. There
is a task there where you have a remote name resolved locally.

Yeah, it was an ejbjar task where you could do the following:
<dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" location="${dtd.ejb}" />

I know that doesn't help, but well, it's part of the plan.
 
J

Juan

Harry said:
Well, I really can't think of if I actually "Fixed" the problem or just
went ahead and changed the xml file to reference a local copy and not
the remote copy... I found a discussion about this sort of issue here:
http://www.mail-archive.com/[email protected]/msg03510.html

I seem to recall this also has a problem while I was using ANT. There
is a task there where you have a remote name resolved locally.

Yeah, it was an ejbjar task where you could do the following:
<dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" location="${dtd.ejb}" />

Harry,

Thank you for your help. Before trying to edit the XML file using other
tools ,I'd like to try to solve this in a "correct" way. That is,
providing a XML catalog to Tomcat so that it can resolve the local DTD
using its key.

So far I didn't find a solution, though.

Regards,

- Juan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top