- All Known Implementing Classes:
DefaultWebApplicationRequestMapper
public interface WebApplicationRequestMapper
The WebApplicationRequestMapper API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionaddFilterMapping
(String filterName, String... urlPatterns) Add a filter mapping.addFilterMapping
(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns) Add a filter mapping.addFilterMappingBeforeExisting
(String filterName, String... urlPatterns) Add a filter mapping.addFilterMappingBeforeExisting
(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns) Add a filter mapping.addServletMapping
(String servletName, String... urlPatterns) Add a servlet mapping.findFilterMappings
(jakarta.servlet.DispatcherType dispatcherType, String path) Find the filter mappings for the given path.default Collection<String>
findFilterMappings
(String path) Find the filter mappings for the given path.findServletMapping
(String path) Find the servlet mapping for the given path.default String
Get the default servlet.getServletMappings
(String servletName) Get the mappings for the specified servlet.getServletName
(String mapping) Get the servlet name for the specified mapping.removeServletMapping
(String urlPattern) Remove a mapping.
-
Method Details
-
addServletMapping
Add a servlet mapping.- Parameters:
servletName
- the servlet name.urlPatterns
- the URL patterns to map (aka mappings).- Returns:
- the URL patterns that were added.
-
removeServletMapping
Remove a mapping.- Parameters:
urlPattern
- the URL pattern- Returns:
- the Servlet name the pattern was mapped to, or null if no prior mapping.
-
addFilterMapping
Add a filter mapping.This adds the filter mappings at the end of list of existing mappings (if any).
- Parameters:
filterName
- the filter name.urlPatterns
- the URL patterns to map (aka mappings).- Returns:
- the URL patterns that were added.
-
addFilterMapping
Set<String> addFilterMapping(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns) Add a filter mapping.This adds the filter mappings at the end of list of existing mappings (if any).
- Parameters:
dispatcherTypes
- the dispatcher types.filterName
- the filter name.urlPatterns
- the URL patterns to map (aka mappings).- Returns:
- the URL patterns that were added.
-
addFilterMappingBeforeExisting
Add a filter mapping.This adds the filter mappings at the start of list of existing mappings (if any). If there are existing mappings these are shifted to the right.
- Parameters:
filterName
- the filter name.urlPatterns
- the URL patterns to map (aka mappings).- Returns:
- the URL patterns that were added.
-
addFilterMappingBeforeExisting
Set<String> addFilterMappingBeforeExisting(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns) Add a filter mapping.This adds the filter mappings at the start of list of existing mappings (if any). If there are existing mappings these are shifted to the right.
- Parameters:
dispatcherTypes
- the dispatcher types.filterName
- the filter name.urlPatterns
- the URL patterns to map (aka mappings).- Returns:
- the URL patterns that were added.
-
findFilterMappings
Find the filter mappings for the given path.- Parameters:
path
- the path.- Returns:
- the mappings.
-
findFilterMappings
Find the filter mappings for the given path.- Parameters:
dispatcherType
- the dispatcher type.path
- the path.- Returns:
- the mappings.
-
findServletMapping
Find the servlet mapping for the given path.- Parameters:
path
- the path.- Returns:
- the mapping, or null if not found.
-
getServletMappings
Get the mappings for the specified servlet.- Parameters:
servletName
- the servlet name.- Returns:
- the servlet mappings, or an empty collection if none.
-
getDefaultServlet
Get the default servlet.- Returns:
- the default servlet.
-
getServletName
Get the servlet name for the specified mapping.- Parameters:
mapping
- the mapping.- Returns:
- the servlet name, or null if not found.
-