|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.web.servlet.support
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Context holder for request-specific state, like current web application context, current locale, current theme, and potential binding errors. Provides easy access to localized messages and Errors instances.Class RequestContext, constructor RequestContext(HttpServletRequest, Map<String, Object>)Suitable for exposition to views, and usage within JSP's "useBean" tag, JSP scriptlets, JSTL EL, Velocity templates, etc. Necessary for views that do not have access to the servlet request, like Velocity templates.
Can be instantiated manually, or automatically exposed to views as model attribute via AbstractView's "requestContextAttribute" property.
Will also work outside of DispatcherServlet requests, accessing the root WebApplicationContext and using an appropriate fallback for the locale (the HttpServletRequest's primary locale).
@author Juergen Hoeller @since 03.03.2003 @see org.springframework.web.servlet.DispatcherServlet @see org.springframework.web.servlet.view.AbstractView#setRequestContextAttribute @see org.springframework.web.servlet.view.UrlBasedViewResolver#setRequestContextAttribute @see #getFallbackLocale()
Create a new RequestContext for the given request, using the given model attributes for Errors retrieval.Class RequestContext, String getContextUrl(String, Map<String, ?>)This works with all View implementations. It will typically be used by View implementations.
Will only work within a DispatcherServlet request. Pass in a ServletContext to be able to fallback to the root WebApplicationContext. @param request current HTTP request @param model the model attributes for the current view (can be
null
, using the request attributes for Errors retrieval) @see org.springframework.web.servlet.DispatcherServlet @see #RequestContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, Map)
Return a context-aware URl for the given relative URL with placeholders (named keys with bracesClass RequestContext, String getPathToServlet(){}
). For example, send in a relative URLfoo/{bar}?spam={spam}
and a parameter map{bar=baz,spam=nuts}
and the result will be[contextpath]/foo/baz?spam=nuts
.@param relativeUrl the relative URL part @param params a map of parameters to insert as placeholders in the url @return a URL that points back to the server with an absolute path (also URL-encoded accordingly)
Return the path to URL mappings within the current servlet includingClass RequestContext, RequestDataValueProcessor getRequestDataValueProcessor()thethe context path and the servlet path of the original request. This is useful for building links to other resources within the application whereaa servlet mapping of the style {@code "/main/*"} is used.Delegates to the UrlPathHelper for decoding the context path. @see javax.servlet.http.HttpServletRequest#getContextPath @see javax.servlet.http.HttpServletRequest#getServletPath() @see #getUrlPathHelper
Return the RequestDataValueProcessor instance to use obtained fromthethe WebApplicationContext under the name {@code "requestDataValueProcessor"}. Or {@code null} if no matching bean was found.
AClass ServletUriComponentsBuilder, ServletUriComponentsBuilder fromContextPath(HttpServletRequest)builderUriComponentsBuilderfor UriComponentsthatoffers static factory methods toextractsextractinformation from an{@codeHttpServletRequest}.@author Rossen Stoyanchev @since 3.1
Class ServletUriComponentsBuilder, ServletUriComponentsBuilder fromCurrentContextPath()ReturnPrepare a builderinitializedfromwiththe host, port, scheme, andthecontext pathof theofgiven requestan HttpServletRequest.
Class ServletUriComponentsBuilder, ServletUriComponentsBuilder fromCurrentRequest()Equivalent toSame as .fromContextPath(HttpServletRequest) except the request is obtainedviathrough RequestContextHolder.
Class ServletUriComponentsBuilder, ServletUriComponentsBuilder fromCurrentServletMapping()Equivalent toSame as .fromRequest(HttpServletRequest) except the request is obtainedviathrough RequestContextHolder.
Class ServletUriComponentsBuilder, ServletUriComponentsBuilder fromRequest(HttpServletRequest)Equivalent toSame as .fromServletMapping(HttpServletRequest) except the request is obtainedviathrough RequestContextHolder.
Class ServletUriComponentsBuilder, ServletUriComponentsBuilder fromServletMapping(HttpServletRequest)ReturnPrepare a builderinitializedbywithcopyingall available information inthegiven request includingscheme, host, port, path,andand query string of an HttpServletRequest.
ReturnPrepare a builderinitializedfromwiththe host, port, scheme, context path,andandtheservlet mapping of an HttpServletRequest. The results may vary depending on thegiventyperequest.ofservletFormappingexampleused.ifIf the servlet is mapped by name,
i.e.g. {@code "/main/*"},thentheresulting pathpath willbeend{@codewith/appContext"/main}". If theservlet pathservlet isnotmappedby nameotherwise,i.e.g. {@code "/"} or {@code "*.htmldo"},thentheresulting pathresult willcontainbe thecontextsamepathasonlyif calling .fromContextPath(HttpServletRequest).