Hello,
I'm also interested in a solution of that problem. Admittedly the
subject-matter is not the struts-config.dtd but rather any dtd of any
(custom) xml-document struts works with.
TIA
Thomas Burns schrieb:
>
> My coworker posted the original question in the "Running Tomcat+Struts w/o
> internet connection" thread, but since I'm the one trying to overcome this
> particular problem, I thought I'd add some more detail. First off, we're
> using Tomcat 3.2.1 or 3.2.2 (not sure) and Struts 1.0.
>
> The DOCTYPE line of the struts-config.xml by default looks like:
>
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 1.0//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
>
> If I run tomcat disconnected from the network I get the following:
>
> resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
> 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
> Not registered, use system identifier
> Parse Fatal Error at line 3 column -1: External entity not found:
> http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd.
>
> whereupon Tomcat barfs and stops loading. It was suggested to use a
> 'file://' style URL to fix this. That works fine, (i.e.
> 'file:///c:/foo/bar/struts-config_1_0.dtd') but it demands an absolute file
> path. Any attempt to use a relative path (such as
> 'file://struts-config_1_0.dtd') has failed with the same 'external entity
> not found' error as above. I've tried various permutations, but either it
> doesn't work, or I can't figure out what the current working directory is
> that the URL will base itself off of (tried tomcat/bin, webapps,
> webapps/myapp, webapps/myapp/WEB-INF).
>
> So, how about specifying the file directly, as in:
>
> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 1.0//EN" "struts-config_1_0.dtd">
>
> Well, here's the resulting error:
>
> Parse Fatal Error at line 3 column -1: Relative URI "struts-config_1_0.dtd";
> can not be resolved without a document URI.
>
> Even though XML Spy thinks this is OK, obviously tomcat wants a little more
> information. I poked around in the XML Bible, but couldn't find anything to
> tip me off as to what to include in the XML that would make this error go
> away.
>
> All I want to do is have the struts DTD be a local file, referenced with
> some sort of resolveable relative path. An absolute path just can't be
> worked with, and we cannot guarantee a network connection. Any more ideas?
>
> Thanks!
>
> t
> --
> Thomas Burns
> RiskMetrics Group
> [EMAIL PROTECTED]
> 734.945.6428
_________________________________________
Hartmut Bernecker
Electronic Publishing
ASIM(r) - CONTENT MANAGEMENT AT ITS BEST
Druckhaus Waiblingen
Siemenstrasse 10
D-71332 Waiblingen, Germany
Tel.: +49 (0)71 51 / 5 66 - 4 48
Mail: mailto:[EMAIL PROTECTED]
Web: http://www.dhw.de/