I would like to know how is it possible to point to a local copy of the resource for the DTD, instead of the remote one at java.sun.com ?

Roseanne Zhang


I just tried all possible options I could think of. You will have more than one choices to do what you want. Agreed, the worst choice would be the hard-coded system dependent path.

Here we are (I assume you put web-app_2_3.dtd in webapps/yourapp/WEB-INF/ directory):

  • <!DOCTYPE web-app SYSTEM "web-app_2_3.dtd">
  • <!DOCTYPE web-app SYSTEM "/WEB-INF/web-app_2_3.dtd">
  • <!DOCTYPE web-app SYSTEM "file:/home/yourname/tomcat4.1.18/webapps/yourapp/WEB-INF/web-app_2_3.dtd">
    !!!Avoid this one, please!!!