gretty icon indicating copy to clipboard operation
gretty copied to clipboard

DOCTYPE is disallowed

Open icejim opened this issue 8 years ago • 8 comments

Trying to execute tomcatRun, got following message:

DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.

It seems like a Groovy issue. But is it a way to set the feature to false?

icejim avatar Oct 10 '16 21:10 icejim

I get this as well, but I get it immediately during configuration.

mikesnare avatar Feb 06 '17 13:02 mikesnare

I got the same error. Gretty does not seem to support Servlet 2.3 deployment descriptors. DOCTYPE is required there and parser is not set up to allow DOCTYPE declaration. Probably best to use Servlet 2.4 or later. I do not have workaround for 2.3

tonowie avatar Apr 18 '17 08:04 tonowie

I got same error also. Any workaround?

Quarx2k avatar Oct 23 '17 21:10 Quarx2k

Same error at config time

rsivan avatar May 02 '18 23:05 rsivan

Any details available on Gretty configuration, build.gradle etc., Tomcat version in-use? Is Servlet >= 2.4 ever effected?

Servlet 2.3 was released August 2001, 2.4 November 2003 and 4.0 is current, so if this only impacts Servlet <= 2.3 it's hard to see it getting fixed without a PR contribution from a concerned developer.

javabrett avatar May 03 '18 00:05 javabrett

gradle 4.6. There is a Jetty-eclipse 9.4.7. in the classpath. Servlet api 3.1.0 Thanks!

rsivan avatar May 03 '18 01:05 rsivan

@rsivan Can you share parts of your web.xml? Does it contain a DOCTYPE declaration, and if-so, why? For Servlet 3.1 I wouldn't expect that, rather an xmlns and xsi:schemaLocation.

javabrett avatar May 03 '18 01:05 javabrett

Oops, you are right, thank you so much. That fixed my issue!

rsivan avatar May 03 '18 04:05 rsivan