Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Some .tld files contain a <!DOCTYPE....> tag for taglibs at the top of the file. The com.sun.org.apache.xerces parser attempts to connect to the systemid in the DOCTYPE tag, which is:
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
The connection attempt fails and thus the NoRouteToHostException.
After a lot of searching on the Web, I found a valid workaround for this problem. It appears that a lot of people are using this same workaround because they too are getting exceptions caused by the parser not being able to connect to the URL of the DOCTYPE tag. And yes I have called factory.setValidating(false). That prevents validation, but it does not prevent the parser from trying to connect. There does not seem to be any other way around this problem AND it works great.