405 for POST request after overriding DefaultServlet

Solution Verified - Updated -

Issue

  • We've mapped a custom servlet to /, overriding the DefaultServlet. We then mapped the DefaultServlet back to .html:
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.html</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
     <servlet-name>CustomServlet</servlet-name>
     <url-pattern>/</url-pattern>  
  </servlet-mapping> 
  • And now we see a 405 when attempting a POST request against that CustomServlet when not specifying a file name (for example, /app/). This worked previously on EAP 6 and JBossWeb

Environment

  • JBoss Enterprise Application Platform (EAP) 7.x
    • Undertow

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content