* Optimisation for single context
It is a frequent deployment mode to have only a single context.
In that case, the ContextHandlerCollection can bypass a bit of
looping/matching/selecting and just call the single context,
which it works out itself anyway if the request applies to it.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Optimisation for single context
updates from review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 - fixes to jetty implementation of HttpServletMapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - don't lazily generate HttpServletMapping to preserve servletName
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - tests should expect no leading / for matchValue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* resolving TODOs from review
- removed pathSpec from Request
- getServletMapping moved to ServletHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - only create HttpServletMapping for exact matches once
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* use wrapped attributes for async dispatch
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - Changes from review, revert async attribute wrapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - Changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 Async ServletMapping
Greatly increased the scope of this PR by combining the servletPath and
pathInfo into the ServletPathMapping class that implements the
HttpServletPathMapping interface. This allows us to greatly simplify
the matching of servlets and reduce the number of times we need to
actually to the match per request.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
Fixed problems with previous commit
more cleanup of attributes in dispatcher.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
More code cleanups
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
Named dispatch cleanup
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
misc cleanup
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
Added tests for named dispatchers
Do not use ServletPathMapping for named dispatch
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
renamed confusing isDefault method on ServletMapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
simplified setAttribute
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
added javadoc about AsyncAttributes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
Fixed javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>