error 503 and DTD file.

View: New views
2 Messages — Rating Filter:   Alert me  

error 503 and DTD file.

by Renaud-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm trying to use Jdom in my software. When it tries to build a Jdom document, it receives a 503 error.  My software parses a lot of page from w3.org and the error occurs when jdom tries to read the DTD file.
(see :java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)
The 503 error is expected, I mean the w3c returns this http response to reduce the traffic.
I'm wondering if there is a way to prevent jdom from asking the dtd file ? or you may know a way to get around this problem.

Regards
Renaud GUEZENNEC
http://renaudguezennec.homelinux.org/



_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: error 503 and DTD file.

by Olivier Jaquemet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You must develop your own EntityResolver to be used during the XML parsing.
http://www.ibm.com/developerworks/library/x-tipent.html

To make it easier, the following Java project already contains the proper DTD and custom entity resolver which you'll just have to use
http://code.google.com/p/java-xhtml-cache-dtds-entityresolver/

Regards,
Olivier Jaquemet

Renaud guezennec wrote:
Hi all,

I'm trying to use Jdom in my software. When it tries to build a Jdom document, it receives a 503 error.  My software parses a lot of page from w3.org and the error occurs when jdom tries to read the DTD file.
(see :java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)
The 503 error is expected, I mean the w3c returns this http response to reduce the traffic.
I'm wondering if there is a way to prevent jdom from asking the dtd file ? or you may know a way to get around this problem.

Regards
Renaud GUEZENNEC
http://renaudguezennec.homelinux.org/



_______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/youraddr@...


-- 
Olivier Jaquemet olivier.jaquemet@...
Ingénieur R&D Jalios S.A.
Tel: 0970 461 480
http://www.jalios.com/
http://support.jalios.com/

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...