-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
dispatcher.include() with welcome files lead to stack overflow error #5025
Comments
…e() and non-default mapping Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
…e() and non-default mapping Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
Are you using ServletContextHandler? or WebAppContext? (either way, you'd be surprised, there is always some servlet mapped to |
Also, you should never have a named servlet |
…e() and non-default mapping Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
I'm looking from the perspective of |
I wanted to thank you first for responding ;)
Which means (IMO) that "default" servlet is not a requirement. OSGi CMPN Http Service specification defines FYI, here's my unit test where I try to check all the combinations of parameters, redirects, forwards, includes and welcome file scenarios. |
BTW, Jetty again seems the most flexible implementation ;) In Tomcat, welcome files are handled in In Undertow, welcome files are handled by In Jetty, except this include-stack-overflow problem, I had no problems mapping different |
@grgrzybek I've reproduced the problem, am pondering the solution. |
…e() and non-default mapping Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
…e() and non-default mapping Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
…nd non-default mapping (#5026) Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
Applied the PR provided by @grgrzybek - thanks! |
…nd non-default mapping (#5026) Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com> Signed-off-by: Jan Bartel <janb@webtide.com>
Jetty version
10.0.0-SNAPSHOT
Java version
11.0.6
OS type/version
Linux everfree.forest 5.6.19-300.fc32.x86_64 #1 SMP Wed Jun 17 16:10:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Description
I'm working on Pax Web 8 and welcome file handling with default servlets.
I have
org.eclipse.jetty.servlet.DefaultServlet
mapped to/alt/*
only (no mapping oforg.eclipse.jetty.servlet.DefaultServlet
to/
path) withpathInfoOnly=true
init parameter (because I want resources to be located using ... path info only, because this default servlet is not mapped to/
) and another servlet mapped to/gateway/*
.Then context has welcome files configured.
"gateway" servlet does this:
"default" servlet (the one mapped to
/alt/*
is properly called with include (has all thejavax.servlet.include.*
attributes, but it eventually callsorg.eclipse.jetty.server.ResourceService#sendWelcome()
because the/alt/
resource is a directory.The problem is that
sendWelcome()
method creates welcome file/gateway/index.html
instead of/alt/index.html
, because it (usingpathInfoOnly=true
has to restore full request URI.However, when resource servlet is included,
org.eclipse.jetty.server.ResourceService#sendWelcome()
should get the servlet path differently (usingjavax.servlet.include.servlet_path
attribute).The text was updated successfully, but these errors were encountered: