Actually, you already helped me solve the issue with point on "/" vs "/*".  I had a filter mapping to "/", which causes Undertow's DefaultFilter to be exact matched to "/", which then prevents the welcome files from working.  Once I changed the filter to map to "/*" then it works.

Thank you


On Thu, May 29, 2014 at 4:07 PM, Ron Leisti <ron.leisti@gmail.com> wrote:
Thank you Tomaz; I'll try the wildfly list.

In my case I am not setting a mapping on "/".  That mapping is being created automatically by Undertow to its DefaultServlet, which is good because that servlet is responsible for serving static resources.  However, it also seems to ignore the welcome files.


On Thu, May 29, 2014 at 3:20 PM, Tomaž Cerar <tomaz.cerar@gmail.com> wrote:
This is more discussion for WildFly forums https://community.jboss.org/en/wildfly not undertow dev list.
Anyhow, without knowing know your mappings are configured it is hard to help you.

Maybe you just have mapping bit wrong, as there is difference between "/" and "/*"

--
tomaz


On Thu, May 29, 2014 at 3:43 PM, Ron Leisti <ron.leisti@gmail.com> wrote:
Hi,

I've encountered what seems like a but with the handling of welcome files.  I am using Undertow 1.0.0 included in Wildfly 8.0.0

If I don't create a servlet mapping for the URL "/", then Undertow will automatically registers its own DefaultServlet as the mapping.  I would like "/" to automatically invoke a servlet that is mapped to some path like "/foo".  I don't setup an explicit mapping because I don't want my servlet to be the default servlet, because I still want static resources to get resolved automatically.

To get this to work, I create a welcome file entry "foo".  However, I think Undertow is ignoring this mapping in this circumstance.  I've done some debugging into Undertow and found that when the ServletPathMatchesData is created, the DefaultServlet is given an exact match "/" which forces requiredWelcomeFileMatch to false, (ServletPathMatchesData constructor) even if requiredWelcomeFileMatch was true for the DefaultServlet.  With requiredWelcomeFileMatch=false, the welcome file logic is skipped and control is given to the default servlet, which simply returns a 404 for "/".

Is my logic just flawed, or is this a bug?

Thank you

_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev