jboss-web.xml validated with its dtd

I wanted to use the dtd of jboss-web.xml as code completion only works with a schema in eclipse and I don’t like warnings about missing schemas anyway. So here is an example jboss-web.xml that is validated with it’s dtd.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "http://www.jboss.org/j2ee/dtd" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
	<context-root>test</context-root>
</jboss-web>

You can also download the dtd file and save it next to your jboss-web.xml. Then simply shorten your file to

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "http://www.jboss.org/j2ee/dtd" "jboss-web_5_0.dtd">
<jboss-web>
	<context-root>test</context-root>
</jboss-web>

Schemas are listed underĀ http://www.jboss.org/j2ee/dtd.

Leave a Comment