I was facing the same problem depending on the way I was buiding my war
file.

-If I made a copy of all the files and folder required for the my war file
in a specific folder (a copy of my Css/*, Jpg/*, *.jsp, and Web-inf/*) and
then made :
war cvf demo.war .
then running the demo.war in Tomcat, Tomcat was able to resolveEntity(...)
and everything was fine.

-But if I made my war file this way:
war cvf demo.war *.jsp Web-inf Css Jpg
then I faced the DTD-Reference problem.

the 2 war files are the same size and they have the same structure once
uncompressed.

Anyone faced this strange behavior ?
What should I do to correct the situation, any idea?

(yes i could put hte Dtd in the demo.war ... but...i does not explain the
strange behavior... )


Thanks

Maxime



-----Original Message-----
From: DHarty
Sent: Fri, 22 Jun 2001 08:59:34 -0700
Subject: RE: Running Tomcat+Struts w/o internet connection


I was following this thread, and I tried to use a relative directory of the
type:
        file://./struts-config_1_0.dtd"

When I attempted to start tomcat I got the following message:

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'file://.')  Resolving to alternate DTD
'jar:file:/C:/dev/jbproject/TMate/tmate/WEB-INF/lib/struts.jar!/org/apache/s
truts/resources/struts-config_1_0.dtd'

and then my app worked correctly.  Simarly, you could change the http path
to point to a null object. ex:
"http://this.domain.does.not.exist.org/struts/dtds/struts-config_1_0.dtd";;

It seems that if the file can't be found where specified, struts resorts to
a struts-config_1_0.dtd file embedded within struts jar. This may only work
in struts_1.0.

David




-----Original Message-----
From: Liang Li [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:43 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Running Tomcat+Struts w/o internet connection


Of course you can use relative directory, and put the DTD file into your
war.

-----Original Message-----
From: Hartmut Bernecker [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Running Tomcat+Struts w/o internet connection


Hi,

I think that problem has been fixed since Struts 1.0, but I'm not sure.
Do you have a new release from Struts?

The solution with "file://c:/..." is IMHO a problem if you want to
deploy your Application (e.g. in a war-File).
Who guarantees you, Tomcat or JRun or ... will be installed on Drive C?

Currently I have a similar problem: I have a XML-File (retrieved by
SOAP) and do parse it with Digester.
That is no problem. If I want to validate that Document, I do it by
writing the DTD-Reference into the XML-File
( <!DOCTYPE root SYSTEM "xy.dtd"> ) and by calling
digester.validate(true).
The Drawback is, that I must put that DTD in the tomcat/bin Directory,
otherwise it would **not** be found.

Then I tried to use the digester.register method. But it seems, I does
not work, as I want.
What I want is: To put the DTD file in some custom directory and use it
to validate the XML-File (that I get wrapped in in a SOAP Document).

Who knows, how to do that?

Cheers
Hartmut



Liang Li schrieb:
>
> Open the struts-config.xml, change the head
>
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>           "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";;>
>
> To:
>
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>           "file://c:/{where_your_DTD_is}/struts-config_1_0.dtd">
>
> I think that will work.
>
> -----Original Message-----
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat+Struts w/o internet connection
>
> We are trying to run Tomcat + Struts to run our web application without an
> external internet connection.  We are running into a problem because our
> struts-config.xml has an external reference to the struts-config DTD.
What
> is the proper way to modify struts-config.xml to reference a locally
> defined DTD and where would that file normally reside in a standard Tomcat
> installation?
>
> Thanks.




Reply via email to