I haven't found a good solution yet, either, but the problem becomes apparent when you try to go to the URL where the DTD resides, http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd. Instead of getting the DTD, you are redirected to a page saying that the opensymphony.com site has been removed, which I think may have just happend on Monday, May 30. Since the xwork stuff is now part of struts.apache.org, one would have hoped that they would have had the foresight to transfer these DTD files to that domain, and set up redirects on opensymphony.com to go to the new URL, but that doesn't seem to be the case. They do have the site archived, and you can get to the DTD using this URL: http://web.archive.org/web/20090222210559/http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd but that is certainly not a long term solution. The DTD also resides in the xwork jar file, but I haven't found a way to reference the DTD in the jar without using an absolute path, which also isn't a practical solution. I think we are stuck until the xwork DTDs are hosted on struts.apache.org.
So you do have a local copy of the DTD (in the xwork jar file)... then the problem is to tell the parser to use that local copy instead. I have no idea how you would do that in Struts but for the general idea of the available mechanisms, have a look at this Wikipedia article: XML Catalog.
<!ELEMENT validator (#PCDATA)>
name CDATA #REQUIRED
class CDATA #REQUIRED
This seems to have revealed a bug in their XML configuration parsing
logic; hence, the app fails to load the DTD file from a local "jar"
library instead of the internet; we're expecting hundreds of websites
would be suffering of this issue by now.
I can't believe OpenSymphony didn't setup some url forward to the dtd's. I don't think they know about this problem.
I extracted the "xwork-core-2.2.1.jar" file in WEB-INF directory and I replaced the opensymphony dtd reference with the local reference... but not works.
The same thing that if there aren't validators xml.
You can wait a bit and try to download the latest development version from here , I've just posted updates to DTDs. You can try to use xwork-core.jar directly if your Struts version is 2.1 or 2.2, if not extract DTDs and replace what you have in your xwork.jar
This is the very reason I am reluctant to have ANY links to external sites that my production level application requires. It's great until that company has a policy change or goes out of business. No, everything from jQuery to dtd's go on my own directories where I KNOW they will be there tomorrow and the next day and every day after that as long as my website is operational.
Joined: Feb 26, 2008
Glenn Puckett wrote:This is the very reason I am reluctant to have ANY links to external sites that my production level application requires. It's great until that company has a policy change or goes out of business. No, everything from jQuery to dtd's go on my own directories where I KNOW they will be there tomorrow and the next day and every day after that as long as my website is operational.
This change does not directly impacts any existing deployed production systems as required DTDs are bundled with respective JARs.
Changes listed above are done only to satisfy eclipse IDE and there are also other work around to do same.