Maven Jetty Plugin - Disable Http Trace

610 views Asked by At

I have a maven project with a web.xml and run it using mvn jetty:run How can I disable the http-tracing?

Edit: I looked here but I was unable to identify the relevant tags...

This is the relevant plugin:

  <plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.2.11.v20150529</version>
    <configuration>
    <jettyXml>src/jetty.xml</jettyXml>
    </configuration>
   </plugin>
1

There are 1 answers

0
Joakim Erdfelt On BEST ANSWER

Two things.

  1. Jetty 9.2 is EOL (End of Life) - consider upgrading to something supported and stable (such as the recently released 9.4.14.v20181114)

  2. The TRACE method in HTTP is disabled by default (via the webdefaults.xml descriptor).

The only way you can use TRACE is to both intentionally configure your webapp to use a custom default descriptor without this constraint (which your <configuration> section doesn't do), and have a Servlet that implements doTrace() or service() methods to support the TRACE method.