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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.