- All Known Implementing Classes:
DefaultServletInvocation
public interface ServletInvocation
The ServletInvocation API.
This type holds data necessary to invoke a Servlet.
- Author:
- Arjan Tijms
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Can we invoke.Returns the web application request mapping.jakarta.servlet.FilterChain
Returns the filter chain.Returns the filter environments.The original path used to base the Servlet invocation on.default String
Gets the original servlet path.Returns the path info.default jakarta.servlet.ServletConfig
Returns the servlet configuration.Returns the servlet environment.Returns the servlet name.Returns the servlet path.default boolean
Do we have a filter.default boolean
Do we have a servlet.default boolean
Returns whether this invocation is obtained from a getNamedDispatcher.default boolean
Is the servlet unavailable.default void
setFromNamed
(boolean fromNamed)
-
Method Details
-
getInvocationPath
String getInvocationPath()The original path used to base the Servlet invocation on.- Returns:
- the full invocation path
-
getServletName
String getServletName()Returns the servlet name.- Returns:
- the servlet name
-
getServletPath
String getServletPath()Returns the servlet path.- Returns:
- the servlet path
-
getOriginalServletPath
Gets the original servlet path.The original servlet path differs from the servlet path if the invocation locator has found an alternative resource than the one requested. This is typically the case for welcome pages.
- Returns:
- the original servlet path.
-
getPathInfo
String getPathInfo()Returns the path info.- Returns:
- the path info
-
getApplicationRequestMapping
WebApplicationRequestMapping getApplicationRequestMapping()Returns the web application request mapping.- Returns:
- the web application request mapping
-
getServletEnvironment
ServletEnvironment getServletEnvironment()Returns the servlet environment.- Returns:
- the servlet environment
-
getFilterEnvironments
List<FilterEnvironment> getFilterEnvironments()Returns the filter environments.- Returns:
- the filter environments
-
getFilterChain
jakarta.servlet.FilterChain getFilterChain()Returns the filter chain.- Returns:
- the filter chain
-
isFromNamed
default boolean isFromNamed()Returns whether this invocation is obtained from a getNamedDispatcher.- Returns:
- whether this invocation is obtained from a getNamedDispatcher
-
setFromNamed
default void setFromNamed(boolean fromNamed) - Parameters:
fromNamed
- whether this invocation is obtained from a getNamedDispatcher
-
hasServlet
default boolean hasServlet()Do we have a servlet.- Returns:
- true if we do, false otherwise.
-
hasFilter
default boolean hasFilter()Do we have a filter.- Returns:
- true if we do, false otherwise.
-
canInvoke
default boolean canInvoke()Can we invoke.- Returns:
- true if we can, false otherwise.
-
getServletConfig
default jakarta.servlet.ServletConfig getServletConfig()Returns the servlet configuration.- Returns:
- the servlet configuration
-