At 1:24 PM +0100 11/8/04, Thomas Hartwig wrote:
Hello,

I have a problem with DTDs using in an offline environment in a webapp.
Struts tries to validate several xml configurations (validator or tiles) at startup and fails if the DTDs are not found.


I know I could hard code the absolute path to the DTD, but this is very ugly. Do you have a tip how to reference the DTD relative to its application context?

Example: Struts tries to fetch the following DTD and stops working if it is not found:

<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.2.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd";>

well, the "right" way to deal with this is demonstrated in ActionServlet.initConfigDigester(...), where DTDs are registered with the Digester against copies in the class path.


I don't have time at the moment to look through everything, but I'd say it would be appropriate for Tiles and Validator to do this also, if they haven't been updated to do it since the version of Struts you're using (I can see you have an older Validator DTD.)

As always, patches gratefully accepted!

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana

Reply via email to