Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relative URI "-//Sun Microsystems, Inc.//DTD

Status
Not open for further replies.

AnthonyGeorge

Technical User
Joined
Jun 3, 2004
Messages
46
Location
GB
am rewritting my web.xml file so that it points at a local web-app instead of the jboss web-app:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app SYSTEM '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'file:///C:/PanEuro-jboss-3.0.6/docs/dtd/web-app_2_3.dtd'>

<--!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' '
<web-app>
<display-name>PanEuropean</display-name>
<listener>
<listener-class>DoubleHelix.PanEurope.ContextListener</listener-class>
</listener>



I am getting the following error :

11:25:37,679 ERROR [XmlFileLoader] Relative URI "-//Sun Microsystems, Inc.//DTD
Web Application 2.3//EN"; can not be resolved without a document URI.:-1:2
org.xml.sax.SAXParseException: Relative URI "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN"; can not be resolved without a document URI.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3108)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3102)
at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2700)
at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2672)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1117)


Thanks for any help Tony
 
Try the following?
Code:
<!DOCTYPE web-app PUBLIC 
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "[URL unfurl="true"]http://java.sun.com/dtd/web-app_2_3.dtd">[/URL]
Cheers, Neil
 
Fixed by experimentation :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "file:///C:/PanEuro-jboss-3.0.6/docs/dtd/jboss-web_3_0.dtd">

The problem was rthat we wanted to use the local DTD file:///C:/PanEuro-jboss-3.0.6/docs/dtd/jboss-web_3_0.dtd".

The proper format is file:///C:/ for anyone else with this problem.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top