Replace <code> with {@code} throughout Javadoc

Issue: SPR-10128
This commit is contained in:
Chris Beams
2012-12-18 14:45:36 +01:00
parent 8597ec25ec
commit 9540d2c81b
1503 changed files with 8001 additions and 8060 deletions

View File

@@ -112,12 +112,12 @@ import org.springframework.web.util.WebUtils;
* cookie and session storage are included. The ThemeResolver bean name is "themeResolver"; default is {@link
* org.springframework.web.servlet.theme.FixedThemeResolver}. </ul>
*
* <p><b>NOTE: The <code>@RequestMapping</code> annotation will only be processed if a corresponding
* <code>HandlerMapping</code> (for type level annotations) and/or <code>HandlerAdapter</code> (for method level
* <p><b>NOTE: The {@code @RequestMapping} annotation will only be processed if a corresponding
* {@code HandlerMapping} (for type level annotations) and/or {@code HandlerAdapter} (for method level
* annotations) is present in the dispatcher.</b> This is the case by default. However, if you are defining custom
* <code>HandlerMappings</code> or <code>HandlerAdapters</code>, then you need to make sure that a corresponding custom
* <code>DefaultAnnotationHandlerMapping</code> and/or <code>AnnotationMethodHandlerAdapter</code> is defined as well -
* provided that you intend to use <code>@RequestMapping</code>.
* {@code HandlerMappings} or {@code HandlerAdapters}, then you need to make sure that a corresponding custom
* {@code DefaultAnnotationHandlerMapping} and/or {@code AnnotationMethodHandlerAdapter} is defined as well -
* provided that you intend to use {@code @RequestMapping}.
*
* <p><b>A web application can define any number of DispatcherServlets.</b> Each servlet will operate in its own
* namespace, loading its own application context with mappings, handlers, etc. Only the root application context as
@@ -715,7 +715,7 @@ public class DispatcherServlet extends FrameworkServlet {
}
/**
* Return this servlet's ThemeSource, if any; else return <code>null</code>.
* Return this servlet's ThemeSource, if any; else return {@code null}.
* <p>Default is to return the WebApplicationContext as ThemeSource,
* provided that it implements the ThemeSource interface.
* @return the ThemeSource, if any
@@ -732,7 +732,7 @@ public class DispatcherServlet extends FrameworkServlet {
/**
* Obtain this servlet's MultipartResolver, if any.
* @return the MultipartResolver used by this servlet, or <code>null</code> if none
* @return the MultipartResolver used by this servlet, or {@code null} if none
* (indicating that no multipart support is available)
*/
public final MultipartResolver getMultipartResolver() {
@@ -1067,7 +1067,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Return the HandlerExecutionChain for this request. Try all handler mappings in order.
* @param request current HTTP request
* @param cache whether to cache the HandlerExecutionChain in a request attribute
* @return the HandlerExecutionChain, or <code>null</code> if no handler could be found
* @return the HandlerExecutionChain, or {@code null} if no handler could be found
* @deprecated as of Spring 3.0.4, in favor of {@link #getHandler(javax.servlet.http.HttpServletRequest)},
* with this method's cache attribute now effectively getting ignored
*/
@@ -1080,7 +1080,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Return the HandlerExecutionChain for this request.
* <p>Tries all handler mappings in order.
* @param request current HTTP request
* @return the HandlerExecutionChain, or <code>null</code> if no handler could be found
* @return the HandlerExecutionChain, or {@code null} if no handler could be found
*/
protected HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception {
for (HandlerMapping hm : this.handlerMappings) {
@@ -1133,7 +1133,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Determine an error ModelAndView via the registered HandlerExceptionResolvers.
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen at the time of the exception
* @param handler the executed handler, or {@code null} if none chosen at the time of the exception
* (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to
@@ -1211,7 +1211,7 @@ public class DispatcherServlet extends FrameworkServlet {
/**
* Translate the supplied request into a default view name.
* @param request current HTTP servlet request
* @return the view name (or <code>null</code> if no default found)
* @return the view name (or {@code null} if no default found)
* @throws Exception if view name translation failed
*/
protected String getDefaultViewName(HttpServletRequest request) throws Exception {
@@ -1227,7 +1227,7 @@ public class DispatcherServlet extends FrameworkServlet {
* @param model the model to be passed to the view
* @param locale the current locale
* @param request current HTTP servlet request
* @return the View object, or <code>null</code> if none found
* @return the View object, or {@code null} if none found
* @throws Exception if the view cannot be resolved
* (typically in case of problems creating an actual View object)
* @see ViewResolver#resolveViewName

View File

@@ -538,13 +538,13 @@ public abstract class FrameworkServlet extends HttpServletBean {
}
/**
* Retrieve a <code>WebApplicationContext</code> from the <code>ServletContext</code>
* Retrieve a {@code WebApplicationContext} from the {@code ServletContext}
* attribute with the {@link #setContextAttribute configured name}. The
* <code>WebApplicationContext</code> must have already been loaded and stored in the
* <code>ServletContext</code> before this servlet gets initialized (or invoked).
* {@code WebApplicationContext} must have already been loaded and stored in the
* {@code ServletContext} before this servlet gets initialized (or invoked).
* <p>Subclasses may override this method to provide a different
* <code>WebApplicationContext</code> retrieval strategy.
* @return the WebApplicationContext for this servlet, or <code>null</code> if not found
* {@code WebApplicationContext} retrieval strategy.
* @return the WebApplicationContext for this servlet, or {@code null} if not found
* @see #getContextAttribute()
*/
protected WebApplicationContext findWebApplicationContext() {
@@ -571,7 +571,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* created context (for triggering its {@link #onRefresh callback}, and to call
* {@link org.springframework.context.ConfigurableApplicationContext#refresh()}
* before returning the context instance.
* @param parent the parent ApplicationContext to use, or <code>null</code> if none
* @param parent the parent ApplicationContext to use, or {@code null} if none
* @return the WebApplicationContext for this servlet
* @see org.springframework.web.context.support.XmlWebApplicationContext
*/
@@ -652,7 +652,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* {@link org.springframework.web.context.support.XmlWebApplicationContext}
* or a {@link #setContextClass custom context class}, if set.
* Delegates to #createWebApplicationContext(ApplicationContext).
* @param parent the parent WebApplicationContext to use, or <code>null</code> if none
* @param parent the parent WebApplicationContext to use, or {@code null} if none
* @return the WebApplicationContext for this servlet
* @see org.springframework.web.context.support.XmlWebApplicationContext
* @see #createWebApplicationContext(ApplicationContext)
@@ -701,7 +701,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Post-process the given WebApplicationContext before it is refreshed
* and activated as context for this servlet.
* <p>The default implementation is empty. <code>refresh()</code> will
* <p>The default implementation is empty. {@code refresh()} will
* be called automatically after this method returns.
* <p>Note that this method is designed to allow subclasses to modify the application
* context, while {@link #initWebApplicationContext} is designed to allow
@@ -718,7 +718,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Return the ServletContext attribute name for this servlet's WebApplicationContext.
* <p>The default implementation returns
* <code>SERVLET_CONTEXT_PREFIX + servlet name</code>.
* {@code SERVLET_CONTEXT_PREFIX + servlet name}.
* @see #SERVLET_CONTEXT_PREFIX
* @see #getServletName
*/
@@ -799,8 +799,8 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Delegate GET requests to processRequest/doService.
* <p>Will also be invoked by HttpServlet's default implementation of <code>doHead</code>,
* with a <code>NoBodyResponse</code> that just captures the content length.
* <p>Will also be invoked by HttpServlet's default implementation of {@code doHead},
* with a {@code NoBodyResponse} that just captures the content length.
* @see #doService
* @see #doHead
*/
@@ -1010,7 +1010,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* <p>The default implementation takes the name of the UserPrincipal, if any.
* Can be overridden in subclasses.
* @param request current HTTP request
* @return the username, or <code>null</code> if none found
* @return the username, or {@code null} if none found
* @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
*/
protected String getUsernameForRequest(HttpServletRequest request) {
@@ -1022,7 +1022,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* Subclasses must implement this method to do the work of request handling,
* receiving a centralized callback for GET, POST, PUT and DELETE.
* <p>The contract is essentially the same as that for the commonly overridden
* <code>doGet</code> or <code>doPost</code> methods of HttpServlet.
* {@code doGet} or {@code doPost} methods of HttpServlet.
* <p>This class intercepts calls to ensure that exception handling and
* event publication takes place.
* @param request current HTTP request
@@ -1050,7 +1050,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* ApplicationListener endpoint that receives events from this servlet's WebApplicationContext
* only, delegating to <code>onApplicationEvent</code> on the FrameworkServlet instance.
* only, delegating to {@code onApplicationEvent} on the FrameworkServlet instance.
*/
private class ContextRefreshListener implements ApplicationListener<ContextRefreshedEvent> {

View File

@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletResponse;
* extensible. The DispatcherServlet accesses all installed handlers through this
* interface, meaning that it does not contain code specific to any handler type.
*
* <p>Note that a handler can be of type <code>Object</code>. This is to enable
* <p>Note that a handler can be of type {@code Object}. This is to enable
* handlers from other frameworks to be integrated with this framework without
* custom coding, as well as to allow for annotation handler objects that do
* not obey any specific Java interface.
@@ -52,9 +52,9 @@ public interface HandlerAdapter {
* support it. Typical HandlerAdapters will base the decision on the handler
* type. HandlerAdapters will usually only support one handler type each.
* <p>A typical implementation:
* <p><code>
* <p>{@code
* return (handler instanceof MyHandler);
* </code>
* }
* @param handler handler object to check
* @return whether or not this object can use the given handler
*/
@@ -66,16 +66,16 @@ public interface HandlerAdapter {
* @param request current HTTP request
* @param response current HTTP response
* @param handler handler to use. This object must have previously been passed
* to the <code>supports</code> method of this interface, which must have
* returned <code>true</code>.
* to the {@code supports} method of this interface, which must have
* returned {@code true}.
* @throws Exception in case of errors
* @return ModelAndView object with the name of the view and the required
* model data, or <code>null</code> if the request has been handled directly
* model data, or {@code null} if the request has been handled directly
*/
ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception;
/**
* Same contract as for HttpServlet's <code>getLastModified</code> method.
* Same contract as for HttpServlet's {@code getLastModified} method.
* Can simply return -1 if there's no support in the handler class.
* @param request current HTTP request
* @param handler handler to use

View File

@@ -41,11 +41,11 @@ public interface HandlerExceptionResolver {
* should be rendered, for instance by setting a status code.
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen at the
* @param handler the executed handler, or {@code null} if none chosen at the
* time of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to,
* or <code>null</code> for default processing
* or {@code null} for default processing
*/
ModelAndView resolveException(
HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex);

View File

@@ -108,7 +108,7 @@ public class HandlerExecutionChain {
/**
* Return the array of interceptors to apply (in the given order).
* @return the array of HandlerInterceptors instances (may be <code>null</code>)
* @return the array of HandlerInterceptors instances (may be {@code null})
*/
public HandlerInterceptor[] getInterceptors() {
if (this.interceptors == null && this.interceptorList != null) {
@@ -119,7 +119,7 @@ public class HandlerExecutionChain {
/**
* Apply preHandle methods of registered interceptors.
* @return <code>true</code> if the execution chain should proceed with the
* @return {@code true} if the execution chain should proceed with the
* next interceptor or the handler itself. Else, DispatcherServlet assumes
* that this interceptor has already dealt with the response itself.
*/
@@ -193,7 +193,7 @@ public class HandlerExecutionChain {
}
/**
* Delegates to the handler's <code>toString()</code>.
* Delegates to the handler's {@code toString()}.
*/
@Override
public String toString() {

View File

@@ -84,7 +84,7 @@ public interface HandlerInterceptor {
* @param request current HTTP request
* @param response current HTTP response
* @param handler chosen handler to execute, for type and/or instance evaluation
* @return <code>true</code> if the execution chain should proceed with the
* @return {@code true} if the execution chain should proceed with the
* next interceptor or the handler itself. Else, DispatcherServlet assumes
* that this interceptor has already dealt with the response itself.
* @throws Exception in case of errors
@@ -104,8 +104,8 @@ public interface HandlerInterceptor {
* @param response current HTTP response
* @param handler handler (or {@link HandlerMethod}) that started async
* execution, for type and/or instance examination
* @param modelAndView the <code>ModelAndView</code> that the handler returned
* (can also be <code>null</code>)
* @param modelAndView the {@code ModelAndView} that the handler returned
* (can also be {@code null})
* @throws Exception in case of errors
*/
void postHandle(
@@ -116,8 +116,8 @@ public interface HandlerInterceptor {
* Callback after completion of request processing, that is, after rendering
* the view. Will be called on any outcome of handler execution, thus allows
* for proper resource cleanup.
* <p>Note: Will only be called if this interceptor's <code>preHandle</code>
* method has successfully completed and returned <code>true</code>!
* <p>Note: Will only be called if this interceptor's {@code preHandle}
* method has successfully completed and returned {@code true}!
* <p>As with the {@code postHandle} method, the method will be invoked on each
* interceptor in the chain in reverse order, so the first interceptor will be
* the last to be invoked.

View File

@@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletRequest;
* have to. A handler will always be wrapped in a {@link HandlerExecutionChain}
* instance, optionally accompanied by some {@link HandlerInterceptor} instances.
* The DispatcherServlet will first call each HandlerInterceptor's
* <code>preHandle</code> method in the given order, finally invoking the handler
* itself if all <code>preHandle</code> methods have returned <code>true</code>.
* {@code preHandle} method in the given order, finally invoking the handler
* itself if all {@code preHandle} methods have returned {@code true}.
*
* <p>The ability to parameterize this mapping is a powerful and unusual
* capability of this MVC framework. For example, it is possible to write
@@ -118,12 +118,12 @@ public interface HandlerMapping {
* even a tag interface, so that handlers are not constrained in any way.
* For example, a HandlerAdapter could be written to allow another framework's
* handler objects to be used.
* <p>Returns <code>null</code> if no match was found. This is not an error.
* <p>Returns {@code null} if no match was found. This is not an error.
* The DispatcherServlet will query all registered HandlerMapping beans to find
* a match, and only decide there is an error if none can find a handler.
* @param request current HTTP request
* @return a HandlerExecutionChain instance containing handler object and
* any interceptors, or <code>null</code> if no mapping found
* any interceptors, or {@code null} if no mapping found
* @throws Exception if there is an internal error
*/
HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception;

View File

@@ -49,8 +49,8 @@ import org.springframework.web.context.support.ServletContextResourceLoader;
/**
* Simple extension of {@link javax.servlet.http.HttpServlet} which treats
* its config parameters (<code>init-param</code> entries within the
* <code>servlet</code> tag in <code>web.xml</code>) as bean properties.
* its config parameters ({@code init-param} entries within the
* {@code servlet} tag in {@code web.xml}) as bean properties.
*
* <p>A handy superclass for any type of servlet. Type conversion of config
* parameters is automatic, with the corresponding setter method getting
@@ -59,7 +59,7 @@ import org.springframework.web.context.support.ServletContextResourceLoader;
* setter will simply be ignored.
*
* <p>This servlet leaves request handling to subclasses, inheriting the default
* behavior of HttpServlet (<code>doGet</code>, <code>doPost</code>, etc).
* behavior of HttpServlet ({@code doGet}, {@code doPost}, etc).
*
* <p>This generic servlet base class has no dependency on the Spring
* {@link org.springframework.context.ApplicationContext} concept. Simple
@@ -155,7 +155,7 @@ public abstract class HttpServletBean extends HttpServlet
/**
* Overridden method that simply returns <code>null</code> when no
* Overridden method that simply returns {@code null} when no
* ServletConfig set yet.
* @see #getServletConfig()
*/
@@ -165,7 +165,7 @@ public abstract class HttpServletBean extends HttpServlet
}
/**
* Overridden method that simply returns <code>null</code> when no
* Overridden method that simply returns {@code null} when no
* ServletConfig set yet.
* @see #getServletConfig()
*/

View File

@@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletResponse;
* cookies, etc. The default implementation is AcceptHeaderLocaleResolver,
* simply using the request's locale provided by the respective HTTP header.
*
* <p>Use <code>RequestContext.getLocale()</code> to retrieve the current locale
* <p>Use {@code RequestContext.getLocale()} to retrieve the current locale
* in controllers or views, independent of the actual resolution strategy.
*
* @author Juergen Hoeller
@@ -44,7 +44,7 @@ public interface LocaleResolver {
* Resolve the current locale via the given request.
* Should return a default locale as fallback in any case.
* @param request the request to resolve the locale for
* @return the current locale (never <code>null</code>)
* @return the current locale (never {@code null})
*/
Locale resolveLocale(HttpServletRequest request);
@@ -52,9 +52,9 @@ public interface LocaleResolver {
* Set the current locale to the given one.
* @param request the request to be used for locale modification
* @param response the response to be used for locale modification
* @param locale the new locale, or <code>null</code> to clear the locale
* @throws UnsupportedOperationException if the LocaleResolver implementation
* does not support dynamic changing of the theme
* @param locale the new locale, or {@code null} to clear the locale
* @throws UnsupportedOperationException if the LocaleResolver implementation
* does not support dynamic changing of the theme
*/
void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale);

View File

@@ -64,7 +64,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
* Can also be used in conjunction with <code>addObject</code>.
* Can also be used in conjunction with {@code addObject}.
* @param viewName name of the View to render, to be resolved
* by the DispatcherServlet's ViewResolver
* @see #addObject
@@ -75,7 +75,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
* Can also be used in conjunction with <code>addObject</code>.
* Can also be used in conjunction with {@code addObject}.
* @param view View object to render
* @see #addObject
*/
@@ -88,8 +88,8 @@ public class ModelAndView {
* @param viewName name of the View to render, to be resolved
* by the DispatcherServlet's ViewResolver
* @param model Map of model names (Strings) to model objects
* (Objects). Model entries may not be <code>null</code>, but the
* model Map may be <code>null</code> if there is no model data.
* (Objects). Model entries may not be {@code null}, but the
* model Map may be {@code null} if there is no model data.
*/
public ModelAndView(String viewName, Map<String, ?> model) {
this.view = viewName;
@@ -105,8 +105,8 @@ public class ModelAndView {
* Map after supplying it to this class</emphasis>
* @param view View object to render
* @param model Map of model names (Strings) to model objects
* (Objects). Model entries may not be <code>null</code>, but the
* model Map may be <code>null</code> if there is no model data.
* (Objects). Model entries may not be {@code null}, but the
* model Map may be {@code null} if there is no model data.
*/
public ModelAndView(View view, Map<String, ?> model) {
this.view = view;
@@ -150,7 +150,7 @@ public class ModelAndView {
/**
* Return the view name to be resolved by the DispatcherServlet
* via a ViewResolver, or <code>null</code> if we are using a View object.
* via a ViewResolver, or {@code null} if we are using a View object.
*/
public String getViewName() {
return (this.view instanceof String ? (String) this.view : null);
@@ -165,7 +165,7 @@ public class ModelAndView {
}
/**
* Return the View object, or <code>null</code> if we are using a view name
* Return the View object, or {@code null} if we are using a view name
* to be resolved by the DispatcherServlet via a ViewResolver.
*/
public View getView() {
@@ -173,7 +173,7 @@ public class ModelAndView {
}
/**
* Indicate whether or not this <code>ModelAndView</code> has a view, either
* Indicate whether or not this {@code ModelAndView} has a view, either
* as a view name or as a direct {@link View} instance.
*/
public boolean hasView() {
@@ -181,7 +181,7 @@ public class ModelAndView {
}
/**
* Return whether we use a view reference, i.e. <code>true</code>
* Return whether we use a view reference, i.e. {@code true}
* if the view has been specified via a name to be resolved by the
* DispatcherServlet via a ViewResolver.
*/
@@ -190,7 +190,7 @@ public class ModelAndView {
}
/**
* Return the model map. May return <code>null</code>.
* Return the model map. May return {@code null}.
* Called by DispatcherServlet for evaluation of the model.
*/
protected Map<String, Object> getModelInternal() {
@@ -198,7 +198,7 @@ public class ModelAndView {
}
/**
* Return the underlying <code>ModelMap</code> instance (never <code>null</code>).
* Return the underlying {@code ModelMap} instance (never {@code null}).
*/
public ModelMap getModelMap() {
if (this.model == null) {
@@ -208,7 +208,7 @@ public class ModelAndView {
}
/**
* Return the model map. Never returns <code>null</code>.
* Return the model map. Never returns {@code null}.
* To be called by application code for modifying the model.
*/
public Map<String, Object> getModel() {
@@ -219,7 +219,7 @@ public class ModelAndView {
/**
* Add an attribute to the model.
* @param attributeName name of the object to add to the model
* @param attributeValue object to add to the model (never <code>null</code>)
* @param attributeValue object to add to the model (never {@code null})
* @see ModelMap#addAttribute(String, Object)
* @see #getModelMap()
*/
@@ -230,7 +230,7 @@ public class ModelAndView {
/**
* Add an attribute to the model using parameter name generation.
* @param attributeValue the object to add to the model (never <code>null</code>)
* @param attributeValue the object to add to the model (never {@code null})
* @see ModelMap#addAttribute(Object)
* @see #getModelMap()
*/
@@ -255,7 +255,7 @@ public class ModelAndView {
* Clear the state of this ModelAndView object.
* The object will be empty afterwards.
* <p>Can be used to suppress rendering of a given ModelAndView object
* in the <code>postHandle</code> method of a HandlerInterceptor.
* in the {@code postHandle} method of a HandlerInterceptor.
* @see #isEmpty()
* @see HandlerInterceptor#postHandle
*/
@@ -276,7 +276,7 @@ public class ModelAndView {
/**
* Return whether this ModelAndView object is empty as a result of a call to {@link #clear}
* i.e. whether it does not hold any view and does not contain a model.
* <p>Returns <code>false</code> if any additional state was added to the instance
* <p>Returns {@code false} if any additional state was added to the instance
* <strong>after</strong> the call to {@link #clear}.
* @see #clear()
*/

View File

@@ -33,7 +33,7 @@ public interface RequestToViewNameTranslator {
* Translate the given {@link HttpServletRequest} into a view name.
* @param request the incoming {@link HttpServletRequest} providing
* the context from which a view name is to be resolved
* @return the view name (or <code>null</code> if no default found)
* @return the view name (or {@code null} if no default found)
* @throws Exception if view name translation fails
*/
String getViewName(HttpServletRequest request) throws Exception;

View File

@@ -42,27 +42,27 @@ import org.springframework.web.context.support.ServletContextResource;
* of this servlet, and use the "JSP include" action to include this URL,
* with the "resource" parameter indicating the actual target path in the WAR.
*
* <p>The <code>defaultUrl</code> property can be set to the internal
* <p>The {@code defaultUrl} property can be set to the internal
* resource path of a default URL, to be rendered when the target resource
* is not found or not specified in the first place.
*
* <p>The "resource" parameter and the <code>defaultUrl</code> property can
* <p>The "resource" parameter and the {@code defaultUrl} property can
* also specify a list of target resources to combine. Those resources will be
* included one by one to build the response. If last-modified determination
* is active, the newest timestamp among those files will be used.
*
* <p>The <code>allowedResources</code> property can be set to a URL
* <p>The {@code allowedResources} property can be set to a URL
* pattern of resources that should be available via this servlet.
* If not set, any target resource can be requested, including resources
* in the WEB-INF directory!
*
* <p>If using this servlet for direct access rather than via includes,
* the <code>contentType</code> property should be specified to apply a
* the {@code contentType} property should be specified to apply a
* proper content type. Note that a content type header in the target JSP will
* be ignored when including the resource via a RequestDispatcher include.
*
* <p>To apply last-modified timestamps for the target resource, set the
* <code>applyLastModified</code> property to true. This servlet will then
* {@code applyLastModified} property to true. This servlet will then
* return the file timestamp of the target resource as last-modified value,
* falling back to the startup time of this servlet if not retrievable.
*
@@ -231,7 +231,7 @@ public class ResourceServlet extends HttpServletBean {
* <p>Default implementation returns the value of the "resource" parameter.
* Can be overridden in subclasses.
* @param request current HTTP request
* @return the URL of the target resource, or <code>null</code> if none found
* @return the URL of the target resource, or {@code null} if none found
* @see #RESOURCE_PARAM_NAME
*/
protected String determineResourceUrl(HttpServletRequest request) {

View File

@@ -72,7 +72,7 @@ public interface View {
* <p>Can be used to check the content type upfront,
* before the actual rendering process.
* @return the content type String (optionally including a character set),
* or <code>null</code> if not predetermined.
* or {@code null} if not predetermined.
*/
String getContentType();
@@ -83,7 +83,7 @@ public interface View {
* The second step will be the actual rendering of the view,
* for example including the JSP via a RequestDispatcher.
* @param model Map with name Strings as keys and corresponding model
* objects as values (Map can also be <code>null</code> in case of empty model)
* objects as values (Map can also be {@code null} in case of empty model)
* @param request current HTTP request
* @param response HTTP response we are building
* @throws Exception if rendering failed

View File

@@ -76,7 +76,7 @@ public class ViewRendererServlet extends HttpServlet {
/**
* Process this request, handling exceptions.
* The actually event handling is performed by the abstract
* <code>renderView()</code> template method.
* {@code renderView()} template method.
* @see #renderView
*/
protected final void processRequest(HttpServletRequest request, HttpServletResponse response)

View File

@@ -38,14 +38,14 @@ public interface ViewResolver {
/**
* Resolve the given view by name.
* <p>Note: To allow for ViewResolver chaining, a ViewResolver should
* return <code>null</code> if a view with the given name is not defined in it.
* return {@code null} if a view with the given name is not defined in it.
* However, this is not required: Some ViewResolvers will always attempt
* to build View objects with the given name, unable to return <code>null</code>
* to build View objects with the given name, unable to return {@code null}
* (rather throwing an exception when View creation failed).
* @param viewName name of the view to resolve
* @param locale Locale in which to resolve the view.
* ViewResolvers that support internationalization should respect this.
* @return the View object, or <code>null</code> if not found
* @return the View object, or {@code null} if not found
* (optional, to allow for ViewResolver chaining)
* @throws Exception if the view cannot be resolved
* (typically in case of problems creating an actual View object)

View File

@@ -94,7 +94,7 @@ public abstract class AbstractDetectingUrlHandlerMapping extends AbstractUrlHand
* Determine the URLs for the given handler bean.
* @param beanName the name of the candidate bean
* @return the URLs determined for the bean,
* or <code>null</code> or an empty array if none
* or {@code null} or an empty array if none
*/
protected abstract String[] determineUrlsForHandler(String beanName);

View File

@@ -145,7 +145,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* <p>The default implementation checks against the specified mapped handlers
* and handler classes, if any.
* @param request current HTTP request
* @param handler the executed handler, or <code>null</code> if none chosen
* @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return whether this resolved should proceed with resolving the exception
* for the given request and handler
@@ -213,7 +213,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
/**
* Prevents the response from being cached, through setting corresponding
* HTTP headers. See <code>http://www.mnot.net/cache_docs</code>.
* HTTP headers. See {@code http://www.mnot.net/cache_docs}.
* @param response current HTTP response
*/
protected void preventCaching(HttpServletResponse response) {
@@ -233,10 +233,10 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen at the time
* @param handler the executed handler, or {@code null} if none chosen at the time
* of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected abstract ModelAndView doResolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex);

View File

@@ -75,7 +75,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Specify the order value for this HandlerMapping bean.
* <p>Default value is <code>Integer.MAX_VALUE</code>, meaning that it's non-ordered.
* <p>Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public final void setOrder(int order) {
@@ -89,7 +89,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Set the default handler for this handler mapping.
* This handler will be returned if no specific mapping was found.
* <p>Default is <code>null</code>, indicating no default handler.
* <p>Default is {@code null}, indicating no default handler.
*/
public void setDefaultHandler(Object defaultHandler) {
this.defaultHandler = defaultHandler;
@@ -97,7 +97,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return the default handler for this handler mapping,
* or <code>null</code> if none.
* or {@code null} if none.
*/
public Object getDefaultHandler() {
return this.defaultHandler;
@@ -174,7 +174,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* <p>Supported interceptor types are HandlerInterceptor, WebRequestInterceptor, and MappedInterceptor.
* Mapped interceptors apply only to request URLs that match its path patterns.
* Mapped interceptor beans are also detected by type during initialization.
* @param interceptors array of handler interceptors, or <code>null</code> if none
* @param interceptors array of handler interceptors, or {@code null} if none
* @see #adaptInterceptor
* @see org.springframework.web.servlet.HandlerInterceptor
* @see org.springframework.web.context.request.WebRequestInterceptor
@@ -202,7 +202,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* <p>Will be invoked before {@link #initInterceptors()} adapts the specified
* interceptors into {@link HandlerInterceptor} instances.
* <p>The default implementation is empty.
* @param interceptors the configured interceptor List (never <code>null</code>),
* @param interceptors the configured interceptor List (never {@code null}),
* allowing to add further interceptors before as well as after the existing
* interceptors
*/
@@ -270,7 +270,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return the adapted interceptors as HandlerInterceptor array.
* @return the array of HandlerInterceptors, or <code>null</code> if none
* @return the array of HandlerInterceptors, or {@code null} if none
*/
protected final HandlerInterceptor[] getAdaptedInterceptors() {
int count = adaptedInterceptors.size();
@@ -279,7 +279,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return all configured {@link MappedInterceptor}s as an array.
* @return the array of {@link MappedInterceptor}s, or <code>null</code> if none
* @return the array of {@link MappedInterceptor}s, or {@code null} if none
*/
protected final MappedInterceptor[] getMappedInterceptors() {
int count = mappedInterceptors.size();
@@ -310,14 +310,14 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
}
/**
* Look up a handler for the given request, returning <code>null</code> if no
* Look up a handler for the given request, returning {@code null} if no
* specific one is found. This method is called by {@link #getHandler};
* a <code>null</code> return value will lead to the default handler, if one is set.
* a {@code null} return value will lead to the default handler, if one is set.
* <p>Note: This method may also return a pre-built {@link HandlerExecutionChain},
* combining a handler object with dynamically determined interceptors.
* Statically specified interceptors will get merged into such an existing chain.
* @param request current HTTP request
* @return the corresponding handler instance, or <code>null</code> if none found
* @return the corresponding handler instance, or {@code null} if none found
* @throws Exception if there is an internal error
*/
protected abstract Object getHandlerInternal(HttpServletRequest request) throws Exception;
@@ -331,11 +331,11 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* <p><b>NOTE:</b> The passed-in handler object may be a raw handler or a pre-built
* HandlerExecutionChain. This method should handle those two cases explicitly,
* either building a new HandlerExecutionChain or extending the existing chain.
* <p>For simply adding an interceptor, consider calling <code>super.getHandlerExecutionChain</code>
* <p>For simply adding an interceptor, consider calling {@code super.getHandlerExecutionChain}
* and invoking {@link HandlerExecutionChain#addInterceptor} on the returned chain object.
* @param handler the resolved handler instance (never <code>null</code>)
* @param handler the resolved handler instance (never {@code null})
* @param request current HTTP request
* @return the HandlerExecutionChain (never <code>null</code>)
* @return the HandlerExecutionChain (never {@code null})
* @see #getAdaptedInterceptors()
*/
protected HandlerExecutionChain getHandlerExecutionChain(Object handler, HttpServletRequest request) {

View File

@@ -69,10 +69,10 @@ public abstract class AbstractHandlerMethodExceptionResolver extends AbstractHan
* with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
* @param handlerMethod the executed handler method, or <code>null</code> if none chosen at the time
* @param handlerMethod the executed handler method, or {@code null} if none chosen at the time
* of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected abstract ModelAndView doResolveHandlerMethodException(
HttpServletRequest request, HttpServletResponse response,

View File

@@ -63,7 +63,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Set the root handler for this handler mapping, that is,
* the handler to be registered for the root path ("/").
* <p>Default is <code>null</code>, indicating no root handler.
* <p>Default is {@code null}, indicating no root handler.
*/
public void setRootHandler(Object rootHandler) {
this.rootHandler = rootHandler;
@@ -71,7 +71,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Return the root handler for this handler mapping (registered for "/"),
* or <code>null</code> if none.
* or {@code null} if none.
*/
public Object getRootHandler() {
return this.rootHandler;
@@ -94,7 +94,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Look up a handler for the URL path of the given request.
* @param request current HTTP request
* @return the handler instance, or <code>null</code> if none found
* @return the handler instance, or {@code null} if none found
*/
@Override
protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
@@ -138,7 +138,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
* the longest path pattern.
* @param urlPath URL the bean is mapped to
* @param request current HTTP request (to expose the path within the mapping to)
* @return the associated handler instance, or <code>null</code> if not found
* @return the associated handler instance, or {@code null} if not found
* @see #exposePathWithinMapping
* @see org.springframework.util.AntPathMatcher
*/
@@ -218,7 +218,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
* with a special interceptor that exposes the path attribute and uri template variables
* @param rawHandler the raw handler to expose
* @param pathWithinMapping the path to expose before executing the handler
* @param uriTemplateVariables the URI template variables, can be <code>null</code> if no variables found
* @param uriTemplateVariables the URI template variables, can be {@code null} if no variables found
* @return the final handler object
*/
protected Object buildPathExposingHandler(Object rawHandler, String bestMatchingPattern,

View File

@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* Interceptor that places the configured {@link ConversionService} in request scope
* so it's available during request processing. The request attribute name is
* "org.springframework.core.convert.ConversionService", the value of
* <code>ConversionService.class.getName()</code>.
* {@code ConversionService.class.getName()}.
*
* <p>Mainly for use within JSP tags such as the spring:eval tag.
*

View File

@@ -32,7 +32,7 @@ import org.springframework.web.servlet.ModelAndView;
public abstract class HandlerInterceptorAdapter implements AsyncHandlerInterceptor {
/**
* This implementation always returns <code>true</code>.
* This implementation always returns {@code true}.
*/
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {

View File

@@ -61,7 +61,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Set the mappings between exception class names and error view names.
* The exception class name can be a substring, with no wildcard support at present.
* A value of "ServletException" would match <code>javax.servlet.ServletException</code>
* A value of "ServletException" would match {@code javax.servlet.ServletException}
* and subclasses, for example.
* <p><b>NB:</b> Consider carefully how
* specific the pattern is, and whether to include package information (which isn't mandatory).
@@ -143,7 +143,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Set the name of the model attribute as which the exception should be exposed. Default is "exception". <p>This can be
* either set to a different attribute name or to <code>null</code> for not exposing an exception attribute at all.
* either set to a different attribute name or to {@code null} for not exposing an exception attribute at all.
* @see #DEFAULT_EXCEPTION_ATTRIBUTE
*/
public void setExceptionAttribute(String exceptionAttribute) {
@@ -157,10 +157,10 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen at the time of the exception (for example,
* @param handler the executed handler, or {@code null} if none chosen at the time of the exception (for example,
* if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
@Override
protected ModelAndView doResolveException(HttpServletRequest request,
@@ -191,7 +191,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* {@link #setDefaultErrorView "defaultErrorView"} as a fallback.
* @param ex the exception that got thrown during handler execution
* @param request current HTTP request (useful for obtaining metadata)
* @return the resolved view name, or <code>null</code> if excluded or none found
* @return the resolved view name, or {@code null} if excluded or none found
*/
protected String determineViewName(Exception ex, HttpServletRequest request) {
String viewName = null;
@@ -221,7 +221,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* Find a matching view name in the given exception mappings.
* @param exceptionMappings mappings between exception class names and error view names
* @param ex the exception that got thrown during handler execution
* @return the view name, or <code>null</code> if none found
* @return the view name, or {@code null} if none found
* @see #setExceptionMappings
*/
protected String findMatchingViewName(Properties exceptionMappings, Exception ex) {
@@ -273,7 +273,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* <p>Override this in a custom subclass to customize this behavior.
* @param request current HTTP request
* @param viewName the name of the error view
* @return the HTTP status code to use, or <code>null</code> for the servlet container's default
* @return the HTTP status code to use, or {@code null} for the servlet container's default
* (200 in case of a standard error view)
* @see #setDefaultStatusCode
* @see #applyStatusCodeIfPossible

View File

@@ -25,7 +25,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* Adapter to use the Servlet interface with the generic DispatcherServlet.
* Calls the Servlet's <code>service</code> method to handle a request.
* Calls the Servlet's {@code service} method to handle a request.
*
* <p>Last-modified checking is not explicitly supported: This is typically
* handled by the Servlet implementation itself (usually deriving from

View File

@@ -35,11 +35,11 @@ import org.springframework.web.context.ServletContextAware;
* that applies initialization and destruction callbacks to beans that
* implement the {@link javax.servlet.Servlet} interface.
*
* <p>After initialization of the bean instance, the Servlet <code>init</code>
* <p>After initialization of the bean instance, the Servlet {@code init}
* method will be called with a ServletConfig that contains the bean name
* of the Servlet and the ServletContext that it is running in.
*
* <p>Before destruction of the bean instance, the Servlet <code>destroy</code>
* <p>Before destruction of the bean instance, the Servlet {@code destroy}
* will be called.
*
* <p><b>Note that this post-processor does not support Servlet initialization
@@ -76,7 +76,7 @@ public class SimpleServletPostProcessor implements
/**
* Set whether to use the shared ServletConfig object passed in
* through <code>setServletConfig</code>, if available.
* through {@code setServletConfig}, if available.
* <p>Default is "true". Turn this setting to "false" to pass in
* a mock ServletConfig object with the bean name as servlet name,
* holding the current ServletContext.

View File

@@ -32,12 +32,12 @@ import org.springframework.util.CollectionUtils;
* bean references, e.g. via the map element in XML bean definitions.
*
* <p>Mappings to bean names can be set via the "mappings" property, in a form
* accepted by the <code>java.util.Properties</code> class, like as follows:<br>
* <code>
* accepted by the {@code java.util.Properties} class, like as follows:<br>
* {@code
* /welcome.html=ticketController
* /show.html=ticketController
* </code><br>
* The syntax is <code>PATH=HANDLER_BEAN_NAME</code>.
* }<br>
* The syntax is {@code PATH=HANDLER_BEAN_NAME}.
* If the path doesn't begin with a slash, one is prepended.
*
* <p>Supports direct matches (given "/test" -> registered "/test") and "*"

View File

@@ -28,7 +28,7 @@ import org.springframework.web.servlet.LocaleResolver;
* specified in the "accept-language" header of the HTTP request (that is,
* the locale sent by the client browser, normally that of the client's OS).
*
* <p>Note: Does not support <code>setLocale</code>, since the accept header
* <p>Note: Does not support {@code setLocale}, since the accept header
* can only be changed through changing the client's locale settings.
*
* @author Juergen Hoeller

View File

@@ -131,7 +131,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleResol
* <p>The default implementation returns the specified default locale,
* if any, else falls back to the request's accept-header locale.
* @param request the request to resolve the locale for
* @return the default locale (never <code>null</code>)
* @return the default locale (never {@code null})
* @see #setDefaultLocale
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/

View File

@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse;
* that always returns a fixed default locale. Default is the current
* JVM's default locale.
*
* <p>Note: Does not support <code>setLocale</code>, as the fixed locale
* <p>Note: Does not support {@code setLocale}, as the fixed locale
* cannot be changed.
*
* @author Juergen Hoeller

View File

@@ -32,7 +32,7 @@ import org.springframework.web.util.WebUtils;
* that is, when the HttpSession does not have to be created for the locale.
*
* <p>Custom controllers can override the user's locale by calling
* <code>setLocale</code>, e.g. responding to a locale change request.
* {@code setLocale}, e.g. responding to a locale change request.
*
* @author Juergen Hoeller
* @since 27.02.2003
@@ -44,7 +44,7 @@ public class SessionLocaleResolver extends AbstractLocaleResolver {
/**
* Name of the session attribute that holds the locale.
* Only used internally by this implementation.
* Use <code>RequestContext(Utils).getLocale()</code>
* Use {@code RequestContext(Utils).getLocale()}
* to retrieve the current locale in controllers or views.
* @see org.springframework.web.servlet.support.RequestContext#getLocale
* @see org.springframework.web.servlet.support.RequestContextUtils#getLocale
@@ -66,7 +66,7 @@ public class SessionLocaleResolver extends AbstractLocaleResolver {
* <p>The default implementation returns the specified default locale,
* if any, else falls back to the request's accept-header locale.
* @param request the request to resolve the locale for
* @return the default locale (never <code>null</code>)
* @return the default locale (never {@code null})
* @see #setDefaultLocale
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/

View File

@@ -90,14 +90,14 @@ public abstract class AbstractCommandController extends BaseCommandController {
/**
* Template method for request handling, providing a populated and validated instance
* of the command class, and an Errors object containing binding and validation errors.
* <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
* <p>Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current HTTP request
* @param response current HTTP response
* @param command the populated command object
* @param errors validation errors holder
* @return a ModelAndView to render, or <code>null</code> if handled directly
* @return a ModelAndView to render, or {@code null} if handled directly
* @see org.springframework.validation.Errors
* @see org.springframework.validation.BindException#getModel
*/

View File

@@ -28,7 +28,7 @@ import org.springframework.web.util.WebUtils;
* <p>Convenient superclass for controller implementations, using the Template
* Method design pattern.</p>
*
* <p>As stated in the {@link org.springframework.web.servlet.mvc.Controller Controller}
* <p>As stated in the {@link Controller Controller}
* interface, a lot of functionality is already provided by certain abstract
* base controllers. The AbstractController is one of the most important
* abstract base controller providing basic features such as the generation
@@ -38,13 +38,13 @@ import org.springframework.web.util.WebUtils;
* <p><b><a name="workflow">Workflow
* (<a href="Controller.html#workflow">and that defined by interface</a>):</b><br>
* <ol>
* <li>{@link #handleRequest(HttpServletRequest,HttpServletResponse) handleRequest()}
* <li>{@link #handleRequest(HttpServletRequest, HttpServletResponse) handleRequest()}
* will be called by the DispatcherServlet</li>
* <li>Inspection of supported methods (ServletException if request method
* is not support)</li>
* <li>If session is required, try to get it (ServletException if not found)</li>
* <li>Set caching headers if needed according to the cacheSeconds property</li>
* <li>Call abstract method {@link #handleRequestInternal(HttpServletRequest,HttpServletResponse) handleRequestInternal()}
* <li>Call abstract method {@link #handleRequestInternal(HttpServletRequest, HttpServletResponse) handleRequestInternal()}
* (optionally synchronizing around the call on the HttpSession),
* which should be implemented by extending classes to provide actual
* functionality to return {@link org.springframework.web.servlet.ModelAndView ModelAndView} objects.</li>
@@ -86,7 +86,7 @@ import org.springframework.web.util.WebUtils;
* <tr>
* <td>synchronizeOnSession</td>
* <td>false</td>
* <td>whether the call to <code>handleRequestInternal</code> should be
* <td>whether the call to {@code handleRequestInternal} should be
* synchronized around the HttpSession, to serialize invocations
* from the same client. No effect if there is no HttpSession.
* </td>
@@ -105,19 +105,19 @@ public abstract class AbstractController extends WebContentGenerator implements
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
* <p>More specifically, the execution of the <code>handleRequestInternal</code>
* <p>More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* <p>The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
* by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
* by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* <p>In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
* same active logical session. However, this is not guaranteed across
* different servlet containers; the only 100% safe way is a session mutex.
* @see org.springframework.web.servlet.mvc.AbstractController#handleRequestInternal
* @see AbstractController#handleRequestInternal
* @see org.springframework.web.util.HttpSessionMutexListener
* @see org.springframework.web.util.WebUtils#getSessionMutex(javax.servlet.http.HttpSession)
*/
@@ -155,7 +155,7 @@ public abstract class AbstractController extends WebContentGenerator implements
/**
* Template method. Subclasses must implement this.
* The contract is the same as for <code>handleRequest</code>.
* The contract is the same as for {@code handleRequest}.
* @see #handleRequest
*/
protected abstract ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)

View File

@@ -32,7 +32,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* <p>Form controller that auto-populates a form bean from the request.
* This, either using a new bean instance per request, or using the same bean
* when the <code>sessionForm</code> property has been set to <code>true</code>.</p>
* when the {@code sessionForm} property has been set to {@code true}.</p>
*
* <p>This class is the base class for both framework subclasses such as
* {@link SimpleFormController} and {@link AbstractWizardFormController}
@@ -42,19 +42,19 @@ import org.springframework.web.servlet.ModelAndView;
* programmatically. To provide those views using configuration properties,
* use the {@link SimpleFormController}.</p>
*
* <p>Subclasses need to override <code>showForm</code> to prepare the form view,
* and <code>processFormSubmission</code> to handle submit requests. For the latter,
* <p>Subclasses need to override {@code showForm} to prepare the form view,
* and {@code processFormSubmission} to handle submit requests. For the latter,
* binding errors like type mismatches will be reported via the given "errors" holder.
* For additional custom form validation, a validator (property inherited from
* BaseCommandController) can be used, reporting via the same "errors" instance.</p>
*
* <p>Comparing this Controller to the Struts notion of the <code>Action</code>
* <p>Comparing this Controller to the Struts notion of the {@code Action}
* shows us that with Spring, you can use any ordinary JavaBeans or database-
* backed JavaBeans without having to implement a framework-specific class
* (like Struts' <code>ActionForm</code>). More complex properties of JavaBeans
* (like Struts' {@code ActionForm}). More complex properties of JavaBeans
* (Dates, Locales, but also your own application-specific or compound types)
* can be represented and submitted to the controller, by using the notion of
* a <code>java.beans.PropertyEditor</code>. For more information on that
* a {@code java.beans.PropertyEditor}. For more information on that
* subject, see the workflow of this controller and the explanation of the
* {@link BaseCommandController}.</p>
*
@@ -71,7 +71,7 @@ import org.springframework.web.servlet.ModelAndView;
* custom editors for certain fields (often properties of non-primitive
* or non-String types) of the command class. This will render appropriate
* Strings for those property values, e.g. locale-specific date strings.</li>
* <li><em>Only if <code>bindOnNewForm</code> is set to <code>true</code></em>, then
* <li><em>Only if {@code bindOnNewForm} is set to {@code true}</em>, then
* {@link org.springframework.web.bind.ServletRequestDataBinder ServletRequestDataBinder}
* gets applied to populate the new form object with initial request parameters and the
* {@link #onBindOnNewForm(HttpServletRequest, Object, BindException)} callback method is
@@ -97,7 +97,7 @@ import org.springframework.web.servlet.ModelAndView;
* To use a different way of detecting a form submission, override the
* {@link #isFormSubmission isFormSubmission} method.
* </li>
* <li>If <code>sessionForm</code> is not set, {@link #formBackingObject formBackingObject()}
* <li>If {@code sessionForm} is not set, {@link #formBackingObject formBackingObject()}
* is called to retrieve a form object. Otherwise, the controller tries to
* find the command object which is already bound in the session. If it cannot
* find the object, it does a call to {@link #handleInvalidSubmit handleInvalidSubmit}
@@ -107,7 +107,7 @@ import org.springframework.web.servlet.ModelAndView;
* <li>Call to {@link #onBind onBind(HttpServletRequest, Object, Errors)} which allows
* you to do custom processing after binding but before validation (e.g. to manually
* bind request parameters to bean properties, to be seen by the Validator).</li>
* <li>If <code>validateOnBinding</code> is set, a registered Validator will be invoked.
* <li>If {@code validateOnBinding} is set, a registered Validator will be invoked.
* The Validator will check the form object properties, and register corresponding
* errors via the given {@link org.springframework.validation.Errors Errors}</li> object.
* <li>Call to {@link #onBindAndValidate onBindAndValidate()} which allows you
@@ -203,7 +203,7 @@ public abstract class AbstractFormController extends BaseCommandController {
}
/**
* Return <code>true</code> if request parameters should be bound in case of a new form.
* Return {@code true} if request parameters should be bound in case of a new form.
*/
public final boolean isBindOnNewForm() {
return this.bindOnNewForm;
@@ -231,14 +231,14 @@ public abstract class AbstractFormController extends BaseCommandController {
* <a href="http://www.springframework.org/webflow">Spring WebFlow</a>,
* which has full support for conversations and has a much more flexible
* usage model overall.
* @param sessionForm <code>true</code> if session form mode is to be activated
* @param sessionForm {@code true} if session form mode is to be activated
*/
public final void setSessionForm(boolean sessionForm) {
this.sessionForm = sessionForm;
}
/**
* Return <code>true</code> if session form mode is activated.
* Return {@code true} if session form mode is activated.
*/
public final boolean isSessionForm() {
return this.sessionForm;
@@ -302,7 +302,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* <p>The default implementation delegates to the {@link #getFormSessionAttributeName()}
* variant without arguments.
* @param request current HTTP request
* @return the name of the form session attribute, or <code>null</code> if not in session form mode
* @return the name of the form session attribute, or {@code null} if not in session form mode
* @see #getFormSessionAttributeName
* @see javax.servlet.http.HttpSession#getAttribute
*/
@@ -382,8 +382,8 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Callback for custom post-processing in terms of binding for a new form.
* Called when preparing a new form if <code>bindOnNewForm</code> is <code>true</code>.
* <p>The default implementation delegates to <code>onBindOnNewForm(request, command)</code>.
* Called when preparing a new form if {@code bindOnNewForm} is {@code true}.
* <p>The default implementation delegates to {@code onBindOnNewForm(request, command)}.
* @param request current HTTP request
* @param command the command object to perform further binding on
* @param errors validation errors holder, allowing for additional
@@ -403,7 +403,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* <p>Called by the default implementation of the
* {@link #onBindOnNewForm(HttpServletRequest, Object, BindException)} variant
* with all parameters, after standard binding when displaying the form view.
* Only called if <code>bindOnNewForm</code> is set to <code>true</code>.
* Only called if {@code bindOnNewForm} is set to {@code true}.
* <p>The default implementation is empty.
* @param request current HTTP request
* @param command the command object to perform further binding on
@@ -500,10 +500,10 @@ public abstract class AbstractFormController extends BaseCommandController {
* Prepare the form model and view, including reference and error data.
* Can show a configured form page, or generate a form view programmatically.
* <p>A typical implementation will call
* <code>showForm(request, errors, "myView")</code>
* {@code showForm(request, errors, "myView")}
* to prepare the form view for a specific view name, returning the
* ModelAndView provided there.
* <p>For building a custom ModelAndView, call <code>errors.getModel()</code>
* <p>For building a custom ModelAndView, call {@code errors.getModel()}
* to populate the ModelAndView model with the command and the Errors instance,
* under the specified command name, as expected by the "spring:bind" tag.
* You also need to include the model returned by {@link #referenceData}.
@@ -512,7 +512,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @param request current HTTP request
* @param response current HTTP response
* @param errors validation errors holder
* @return the prepared form view, or <code>null</code> if handled directly
* @return the prepared form view, or {@code null} if handled directly
* @throws Exception in case of invalid state or arguments
* @see #showForm(HttpServletRequest, BindException, String)
* @see org.springframework.validation.Errors
@@ -592,12 +592,12 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
* <p>The default implementation returns <code>null</code>.
* <p>The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
* @return a Map with reference data entries, or <code>null</code> if none
* @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -615,7 +615,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* triggering a custom action. They can also provide custom validation and call
* {@link #showForm(HttpServletRequest, HttpServletResponse, BindException)}
* or proceed with the submission accordingly.
* <p>For a success view, call <code>errors.getModel()</code> to populate the
* <p>For a success view, call {@code errors.getModel()} to populate the
* ModelAndView model with the command and the Errors instance, under the
* specified command name, as expected by the "spring:bind" tag. For a form view,
* simply return the ModelAndView object provided by
@@ -624,7 +624,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @param response current servlet response
* @param command form object with request parameters bound onto it
* @param errors holder without errors (subclass can add errors if it wants to)
* @return the prepared model and view, or <code>null</code>
* @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #handleRequestInternal
* @see #isFormSubmission
@@ -659,7 +659,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* }</pre>
* @param request current HTTP request
* @param response current HTTP response
* @return a prepared view, or <code>null</code> if handled directly
* @return a prepared view, or {@code null} if handled directly
* @throws Exception in case of errors
* @see #showNewForm
* @see #getErrorsForNewForm

View File

@@ -25,12 +25,12 @@ import org.springframework.web.servlet.support.RequestContextUtils;
import org.springframework.web.util.UrlPathHelper;
/**
* Abstract base class for <code>Controllers</code> that return a view name
* Abstract base class for {@code Controllers} that return a view name
* based on the request URL.
*
* <p>Provides infrastructure for determining view names from URLs and configurable
* URL lookup. For information on the latter, see <code>alwaysUseFullPath</code>
* and <code>urlDecode</code> properties.
* URL lookup. For information on the latter, see {@code alwaysUseFullPath}
* and {@code urlDecode} properties.
*
* @author Juergen Hoeller
* @since 1.2.6
@@ -112,7 +112,7 @@ public abstract class AbstractUrlViewController extends AbstractController {
* Return the name of the view to render for this request, based on the
* given lookup path. Called by {@link #handleRequestInternal}.
* @param request current HTTP request
* @return a view name for this request (never <code>null</code>)
* @return a view name for this request (never {@code null})
* @see #handleRequestInternal
* @see #setAlwaysUseFullPath
* @see #setUrlDecode

View File

@@ -60,7 +60,7 @@ import org.springframework.web.util.WebUtils;
*
* <p>Note that a validator's default validate method is not executed when using
* this class! Rather, the {@link #validatePage} implementation should call
* special <code>validateXXX</code> methods that the validator needs to provide,
* special {@code validateXXX} methods that the validator needs to provide,
* validating certain pieces of the object. These can be combined to validate
* the elements of individual pages.
*
@@ -161,8 +161,8 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* <p>Note that a concrete wizard form controller might override
* {@link #getPageCount(HttpServletRequest, Object)} to determine
* the page count dynamically. The default implementation of that extended
* <code>getPageCount</code> variant returns the static page count as
* determined by this <code>getPageCount()</code> method.
* {@code getPageCount} variant returns the static page count as
* determined by this {@code getPageCount()} method.
* @see #getPageCount(javax.servlet.http.HttpServletRequest, Object)
*/
protected final int getPageCount() {
@@ -280,7 +280,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
* @param page current wizard page
* @return a Map with reference data entries, or <code>null</code> if none
* @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see #referenceData(HttpServletRequest, int)
* @see ModelAndView
@@ -294,11 +294,11 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
* <p>The default implementation returns <code>null</code>.
* <p>The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
* @param page current wizard page
* @return a Map with reference data entries, or <code>null</code> if none
* @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -420,7 +420,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* <p>The default implementation delegates to the {@link #getPageSessionAttributeName()}
* variant without arguments.
* @param request current HTTP request
* @return the name of the form session attribute, or <code>null</code> if not in session form mode
* @return the name of the form session attribute, or {@code null} if not in session form mode
* @see #getPageSessionAttributeName
* @see #getFormSessionAttributeName(javax.servlet.http.HttpServletRequest)
* @see javax.servlet.http.HttpSession#getAttribute
@@ -452,7 +452,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* to override this method.
* @param request current HTTP request
* @param response current HTTP response
* @return a prepared view, or <code>null</code> if handled directly
* @return a prepared view, or {@code null} if handled directly
* @throws Exception in case of errors
* @see #showNewForm
* @see #setBindOnNewForm
@@ -562,9 +562,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to finish the
* processing of the current form.
* <p>By default, this method returns <code>true</code> if a parameter
* <p>By default, this method returns {@code true} if a parameter
* matching the "_finish" key is present in the request, otherwise it
* returns <code>false</code>. Subclasses may override this method
* returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a finish request.
* <p>The parameter is recognized both when sent as a plain parameter
* ("_finish") or when triggered by an image button ("_finish.x").
@@ -579,9 +579,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to cancel the
* processing of the current form.
* <p>By default, this method returns <code>true</code> if a parameter
* <p>By default, this method returns {@code true} if a parameter
* matching the "_cancel" key is present in the request, otherwise it
* returns <code>false</code>. Subclasses may override this method
* returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a cancel request.
* <p>The parameter is recognized both when sent as a plain parameter
* ("_cancel") or when triggered by an image button ("_cancel.x").
@@ -654,9 +654,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Template method for custom validation logic for individual pages.
* The default implementation calls {@link #validatePage(Object, Errors, int)}.
* <p>Implementations will typically call fine-granular <code>validateXXX</code>
* <p>Implementations will typically call fine-granular {@code validateXXX}
* methods of this instance's Validator, combining them to validation of the
* corresponding pages. The Validator's default <code>validate</code> method
* corresponding pages. The Validator's default {@code validate} method
* will not be called by a wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -675,7 +675,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* The default implementation is empty.
* <p>Implementations will typically call fine-granular validateXXX methods of this
* instance's validator, combining them to validation of the corresponding pages.
* The validator's default <code>validate</code> method will not be called by a
* The validator's default {@code validate} method will not be called by a
* wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -703,7 +703,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Template method for processing the final action of this wizard.
* <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
* <p>Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* <p>You can call the {@link #showPage} method to return back to the wizard,
@@ -728,7 +728,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* <p>The default implementation throws a ServletException, saying that a cancel
* operation is not supported by this controller. Thus, you do not need to
* implement this template method if you do not support a cancel operation.
* <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
* <p>Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current HTTP request

View File

@@ -50,18 +50,18 @@ import org.springframework.web.context.request.ServletWebRequest;
* Upon receiving a request, any BaseCommandController will attempt to fill the
* command object using the request parameters. This is done using the typical
* and well-known JavaBeans property notation. When a request parameter named
* <code>'firstName'</code> exists, the framework will attempt to call
* <code>setFirstName([value])</code> passing the value of the parameter. Nested properties
* are of course supported. For instance a parameter named <code>'address.city'</code>
* will result in a <code>getAddress().setCity([value])</code> call on the
* {@code 'firstName'} exists, the framework will attempt to call
* {@code setFirstName([value])} passing the value of the parameter. Nested properties
* are of course supported. For instance a parameter named {@code 'address.city'}
* will result in a {@code getAddress().setCity([value])} call on the
* command class.</p>
*
* <p>It's important to realise that you are not limited to String arguments in
* your JavaBeans. Using the PropertyEditor-notion as supplied by the
* java.beans package, you will be able to transform Strings to Objects and
* the other way around. For instance <code>setLocale(Locale loc)</code> is
* perfectly possible for a request parameter named <code>locale</code> having
* a value of <code>en</code>, as long as you register the appropriate
* the other way around. For instance {@code setLocale(Locale loc)} is
* perfectly possible for a request parameter named {@code locale} having
* a value of {@code en}, as long as you register the appropriate
* PropertyEditor in the Controller (see {@link #initBinder initBinder()}
* for more information on that matter.</p>
*
@@ -237,7 +237,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Set the strategy to use for resolving errors into message codes.
* Applies the given strategy to all data binders used by this controller.
* <p>Default is <code>null</code>, i.e. using the default strategy of
* <p>Default is {@code null}, i.e. using the default strategy of
* the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setMessageCodesResolver
@@ -255,8 +255,8 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Set the strategy to use for processing binding errors, that is,
* required field errors and <code>PropertyAccessException</code>s.
* <p>Default is <code>null</code>, that is, using the default strategy
* required field errors and {@code PropertyAccessException}s.
* <p>Default is {@code null}, that is, using the default strategy
* of the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setBindingErrorProcessor
@@ -349,7 +349,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Create a new command instance for the command class of this controller.
* <p>This implementation uses <code>BeanUtils.instantiateClass</code>,
* <p>This implementation uses {@code BeanUtils.instantiateClass},
* so the command needs to have a no-arg constructor (supposed to be
* public, but not required to).
* @return the new command instance
@@ -472,8 +472,8 @@ public abstract class BaseCommandController extends AbstractController {
* Determine whether to use direct field access instead of bean property access.
* Applied by {@link #prepareBinder}.
* <p>Default is "false". Can be overridden in subclasses.
* @return whether to use direct field access (<code>true</code>)
* or bean property access (<code>false</code>)
* @return whether to use direct field access ({@code true})
* or bean property access ({@code false})
* @see #prepareBinder
* @see org.springframework.validation.DataBinder#initDirectFieldAccess()
*/

View File

@@ -24,10 +24,10 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.WebUtils;
/**
* <p>Extension of <code>SimpleFormController</code> that supports "cancellation"
* <p>Extension of {@code SimpleFormController} that supports "cancellation"
* of form processing. By default, this controller looks for a given parameter in the
* request, identified by the <code>cancelParamKey<code>. If this parameter is present,
* then the controller will return the configured <code>cancelView</code>, otherwise
* request, identified by the {@code cancelParamKey}. If this parameter is present,
* then the controller will return the configured {@code cancelView}, otherwise
* processing is passed back to the superclass.</p>
*
* <p><b><a name="workflow">Workflow
@@ -35,15 +35,15 @@ import org.springframework.web.util.WebUtils;
* <ol>
* <li>Call to {@link #processFormSubmission processFormSubmission} which calls
* {@link #isCancelRequest} to see if the incoming request is to cancel the
* current form entry. By default, {@link #isCancelRequest} returns <code>true</code>
* if the configured <code>cancelParamKey</code> exists in the request.
* current form entry. By default, {@link #isCancelRequest} returns {@code true}
* if the configured {@code cancelParamKey} exists in the request.
* This behavior can be overridden in subclasses.</li>
* <li>If {@link #isCancelRequest} returns <code>false</code>, then the controller
* <li>If {@link #isCancelRequest} returns {@code false}, then the controller
* will delegate all processing back to {@link SimpleFormController SimpleFormController},
* otherwise it will call the {@link #onCancel} version with all parameters.
* By default, that method will delegate to the {@link #onCancel} version with just
* the command object, which will in turn simply return the configured
* <code>cancelView</code>. This behavior can be overridden in subclasses.</li>
* {@code cancelView}. This behavior can be overridden in subclasses.</li>
* </ol>
* </p>
*
@@ -149,9 +149,9 @@ public class CancellableFormController extends SimpleFormController {
/**
* Determine whether the incoming request is a request to cancel the
* processing of the current form.
* <p>By default, this method returns <code>true</code> if a parameter
* matching the configured <code>cancelParamKey</code> is present in
* the request, otherwise it returns <code>false</code>. Subclasses may
* <p>By default, this method returns {@code true} if a parameter
* matching the configured {@code cancelParamKey} is present in
* the request, otherwise it returns {@code false}. Subclasses may
* override this method to provide custom logic to detect a cancel request.
* <p>The parameter is recognized both when sent as a plain parameter
* ("_cancel") or when triggered by an image button ("_cancel.x").
@@ -165,18 +165,18 @@ public class CancellableFormController extends SimpleFormController {
/**
* Callback method for handling a cancel request. Called if {@link #isCancelRequest}
* returns <code>true</code>.
* <p>Default implementation delegates to <code>onCancel(Object)</code> to return
* the configured <code>cancelView</code>. Subclasses may override either of the two
* returns {@code true}.
* <p>Default implementation delegates to {@code onCancel(Object)} to return
* the configured {@code cancelView}. Subclasses may override either of the two
* methods to build a custom {@link ModelAndView ModelAndView} that may contain model
* parameters used in the cancel view.
* <p>If you simply want to move the user to a new view and you don't want to add
* additional model parameters, use {@link #setCancelView(String)} rather than
* overriding an <code>onCancel</code> method.
* overriding an {@code onCancel} method.
* @param request current servlet request
* @param response current servlet response
* @param command form object with request parameters bound onto it
* @return the prepared model and view, or <code>null</code>
* @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #isCancelRequest(javax.servlet.http.HttpServletRequest)
* @see #onCancel(Object)
@@ -189,16 +189,16 @@ public class CancellableFormController extends SimpleFormController {
}
/**
* Simple <code>onCancel</code> version. Called by the default implementation
* of the <code>onCancel</code> version with all parameters.
* <p>Default implementation returns eturns the configured <code>cancelView</code>.
* Simple {@code onCancel} version. Called by the default implementation
* of the {@code onCancel} version with all parameters.
* <p>Default implementation returns eturns the configured {@code cancelView}.
* Subclasses may override this method to build a custom {@link ModelAndView ModelAndView}
* that may contain model parameters used in the cancel view.
* <p>If you simply want to move the user to a new view and you don't want to add
* additional model parameters, use {@link #setCancelView(String)} rather than
* overriding an <code>onCancel</code> method.
* overriding an {@code onCancel} method.
* @param command form object with request parameters bound onto it
* @return the prepared model and view, or <code>null</code>
* @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #onCancel(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, Object)
* @see #setCancelView

View File

@@ -23,10 +23,10 @@ import org.springframework.web.servlet.ModelAndView;
/**
* Base Controller interface, representing a component that receives
* <code>HttpServletRequest</code> and <code>HttpServletResponse</code>
* instances just like a <code>HttpServlet</code> but is able to
* {@code HttpServletRequest} and {@code HttpServletResponse}
* instances just like a {@code HttpServlet} but is able to
* participate in an MVC workflow. Controllers are comparable to the
* notion of a Struts <code>Action</code>.
* notion of a Struts {@code Action}.
*
* <p>Any implementation of the Controller interface should be a
* <i>reusable, thread-safe</i> class, capable of handling multiple
@@ -80,9 +80,9 @@ import org.springframework.web.servlet.ModelAndView;
* choose to implement specific awareness interfaces, just like any other bean in a
* Spring (web) application context can do, for example:</p>
* <ul>
* <li><code>org.springframework.context.ApplicationContextAware</code></li>
* <li><code>org.springframework.context.ResourceLoaderAware</code></li>
* <li><code>org.springframework.web.context.ServletContextAware</code></li>
* <li>{@code org.springframework.context.ApplicationContextAware}</li>
* <li>{@code org.springframework.context.ResourceLoaderAware}</li>
* <li>{@code org.springframework.web.context.ServletContextAware}</li>
* </ul>
*
* <p>Such environment references can easily be passed in testing environments,
@@ -111,12 +111,12 @@ public interface Controller {
/**
* Process the request and return a ModelAndView object which the DispatcherServlet
* will render. A <code>null</code> return value is not an error: It indicates that
* will render. A {@code null} return value is not an error: It indicates that
* this object completed request processing itself, thus there is no ModelAndView
* to render.
* @param request current HTTP request
* @param response current HTTP response
* @return a ModelAndView to render, or <code>null</code> if handled directly
* @return a ModelAndView to render, or {@code null} if handled directly
* @throws Exception in case of errors
*/
ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception;

View File

@@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* Supports last-modified HTTP requests to facilitate content caching.
* Same contract as for the Servlet API's <code>getLastModified</code> method.
* Same contract as for the Servlet API's {@code getLastModified} method.
*
* <p>Delegated to by a {@link org.springframework.web.servlet.HandlerAdapter#getLastModified}
* implementation. By default, any Controller or HttpRequestHandler within Spring's
@@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletRequest;
*
* <p><b>Note:</b> Alternative handler implementation approaches have different
* last-modified handling styles. For example, Spring 2.5's annotated controller
* approach (using <code>@RequestMapping</code>) provides last-modified support
* approach (using {@code @RequestMapping}) provides last-modified support
* through the {@link org.springframework.web.context.request.WebRequest#checkNotModified}
* method, allowing for last-modified checking within the main handler method.
*
@@ -43,7 +43,7 @@ import javax.servlet.http.HttpServletRequest;
public interface LastModified {
/**
* Same contract as for HttpServlet's <code>getLastModified</code> method.
* Same contract as for HttpServlet's {@code getLastModified} method.
* Invoked <b>before</b> request processing.
* <p>The return value will be sent to the HTTP client as Last-Modified header,
* and compared with If-Modified-Since headers that the client sends back.

View File

@@ -41,7 +41,7 @@ import org.springframework.web.servlet.support.RequestContextUtils;
* <li>Request is received by the controller</li>
* <li>call to {@link #handleRequestInternal handleRequestInternal} which
* just returns the view, named by the configuration property
* <code>viewName</code>. Nothing more, nothing less</li>
* {@code viewName}. Nothing more, nothing less</li>
* </ol>
* </p>
*

View File

@@ -136,14 +136,14 @@ public class ServletForwardingController extends AbstractController implements B
}
/**
* Determine whether to use RequestDispatcher's <code>include</code> or
* <code>forward</code> method.
* Determine whether to use RequestDispatcher's {@code include} or
* {@code forward} method.
* <p>Performs a check whether an include URI attribute is found in the request,
* indicating an include request, and whether the response has already been committed.
* In both cases, an include will be performed, as a forward is not possible anymore.
* @param request current HTTP request
* @param response current HTTP response
* @return <code>true</code> for include, <code>false</code> for forward
* @return {@code true} for include, {@code false} for forward
* @see javax.servlet.RequestDispatcher#forward
* @see javax.servlet.RequestDispatcher#include
* @see javax.servlet.ServletResponse#isCommitted

View File

@@ -38,7 +38,7 @@ import org.springframework.web.servlet.ModelAndView;
* <p>Useful to invoke an existing servlet via Spring's dispatching infrastructure,
* for example to apply Spring HandlerInterceptors to its requests.
*
* <p>Note that Struts has a special requirement in that it parses <code>web.xml</code>
* <p>Note that Struts has a special requirement in that it parses {@code web.xml}
* to find its servlet mapping. Therefore, you need to specify the DispatcherServlet's
* servlet name as "servletName" on this controller, so that Struts finds the
* DispatcherServlet's mapping (thinking that it refers to the ActionServlet).
@@ -100,7 +100,7 @@ public class ServletWrappingController extends AbstractController
/**
* Set the class of the servlet to wrap.
* Needs to implement <code>javax.servlet.Servlet</code>.
* Needs to implement {@code javax.servlet.Servlet}.
* @see javax.servlet.Servlet
*/
public void setServletClass(Class servletClass) {

View File

@@ -58,7 +58,7 @@ import org.springframework.web.servlet.ModelAndView;
* using all parameters, which in case of the default implementation delegates to
* {@link #onSubmit(Object, BindException) onSubmit} with just the command object.
* The default implementation of the latter method will return the configured
* <code>successView</code>. Consider implementing {@link #doSubmitAction} doSubmitAction
* {@code successView}. Consider implementing {@link #doSubmitAction} doSubmitAction
* for simply performing a submit action and rendering the success view.</li>
* </ol>
* </p>
@@ -112,7 +112,7 @@ public class SimpleFormController extends AbstractFormController {
* <p>Subclasses should set the following properties, either in the constructor
* or via a BeanFactory: commandName, commandClass, sessionForm, formView,
* successView. Note that commandClass doesn't need to be set when overriding
* <code>formBackingObject</code>, as this determines the class anyway.
* {@code formBackingObject}, as this determines the class anyway.
* @see #setCommandClass
* @see #setCommandName
* @see #setSessionForm
@@ -209,7 +209,7 @@ public class SimpleFormController extends AbstractFormController {
* @param request current HTTP request
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
* @return a Map with reference data entries, or <code>null</code> if none
* @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -222,10 +222,10 @@ public class SimpleFormController extends AbstractFormController {
* Create a reference data map for the given request.
* Called by the {@link #referenceData(HttpServletRequest, Object, Errors)}
* variant with all parameters.
* <p>The default implementation returns <code>null</code>.
* <p>The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
* @return a Map with reference data entries, or <code>null</code> if none
* @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see #referenceData(HttpServletRequest, Object, Errors)
* @see ModelAndView
@@ -243,7 +243,7 @@ public class SimpleFormController extends AbstractFormController {
* variant else.
* <p>This can only be overridden to check for an action that should be executed
* without respect to binding errors, like a cancel action. To just handle successful
* submissions without binding errors, override one of the <code>onSubmit</code>
* submissions without binding errors, override one of the {@code onSubmit}
* methods or {@link #doSubmitAction}.
* @see #showForm(HttpServletRequest, HttpServletResponse, BindException)
* @see #onSubmit(HttpServletRequest, HttpServletResponse, Object, BindException)
@@ -304,9 +304,9 @@ public class SimpleFormController extends AbstractFormController {
}
/**
* Simpler <code>isFormChangeRequest</code> variant, called by the full
* Simpler {@code isFormChangeRequest} variant, called by the full
* variant {@link #isFormChangeRequest(HttpServletRequest, Object)}.
* <p>The default implementation returns <code>false</code.
* <p>The default implementation returns {@code false}.
* @param request current HTTP request
* @return whether the given request is a form change request
* @see #suppressValidation
@@ -319,7 +319,7 @@ public class SimpleFormController extends AbstractFormController {
/**
* Called during form submission if
* {@link #isFormChangeRequest(javax.servlet.http.HttpServletRequest)}
* returns <code>true</code>. Allows subclasses to implement custom logic
* returns {@code true}. Allows subclasses to implement custom logic
* to modify the command object to directly modify data in the form.
* <p>The default implementation delegates to
* {@link #onFormChange(HttpServletRequest, HttpServletResponse, Object, BindException)}.
@@ -340,7 +340,7 @@ public class SimpleFormController extends AbstractFormController {
}
/**
* Simpler <code>onFormChange</code> variant, called by the full variant
* Simpler {@code onFormChange} variant, called by the full variant
* {@link #onFormChange(HttpServletRequest, HttpServletResponse, Object, BindException)}.
* <p>The default implementation is empty.
* @param request current servlet request
@@ -360,19 +360,19 @@ public class SimpleFormController extends AbstractFormController {
* <p>The default implementation delegates to {@link #onSubmit(Object, BindException)}.
* For simply performing a submit action and rendering the specified success
* view, consider implementing {@link #doSubmitAction} rather than an
* <code>onSubmit</code> variant.
* {@code onSubmit} variant.
* <p>Subclasses can override this to provide custom submission handling like storing
* the object to the database. Implementations can also perform custom validation and
* call showForm to return to the form. Do <i>not</i> implement multiple onSubmit
* methods: In that case, just this method will be called by the controller.
* <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
* <p>Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current servlet request
* @param response current servlet response
* @param command form object with request parameters bound onto it
* @param errors Errors instance without errors (subclass can add errors if it wants to)
* @return the prepared model and view, or <code>null</code>
* @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #onSubmit(Object, BindException)
* @see #doSubmitAction
@@ -388,7 +388,7 @@ public class SimpleFormController extends AbstractFormController {
}
/**
* Simpler <code>onSubmit</code> variant.
* Simpler {@code onSubmit} variant.
* Called by the default implementation of the
* {@link #onSubmit(HttpServletRequest, HttpServletResponse, Object, BindException)}
* variant with all parameters.
@@ -398,7 +398,7 @@ public class SimpleFormController extends AbstractFormController {
* and Errors instance as model.
* <p>Subclasses can override this to provide custom submission handling that
* does not need request and response.
* <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
* <p>Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param command form object with request parameters bound onto it
@@ -427,10 +427,10 @@ public class SimpleFormController extends AbstractFormController {
}
/**
* Simplest <code>onSubmit</code> variant. Called by the default implementation
* Simplest {@code onSubmit} variant. Called by the default implementation
* of the {@link #onSubmit(Object, BindException)} variant.
* <p>This implementation calls {@link #doSubmitAction(Object)} and returns
* <code>null</code> as ModelAndView, making the calling <code>onSubmit</code>
* {@code null} as ModelAndView, making the calling {@code onSubmit}
* method perform its default rendering of the success view.
* <p>Subclasses can override this to provide custom submission handling
* that just depends on the command object. It's preferable to use either
@@ -438,7 +438,7 @@ public class SimpleFormController extends AbstractFormController {
* though: Use the former when you want to build your own ModelAndView; use the
* latter when you want to perform an action and forward to the successView.
* @param command form object with request parameters bound onto it
* @return the prepared model and view, or <code>null</code> for default
* @return the prepared model and view, or {@code null} for default
* (that is, rendering the configured "successView")
* @throws Exception in case of errors
* @see #onSubmit(Object, BindException)

View File

@@ -24,7 +24,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.servlet.HandlerMapping;
/**
* Simple <code>Controller</code> implementation that transforms the virtual
* Simple {@code Controller} implementation that transforms the virtual
* path of a URL into a view name and returns that view.
*
* <p>Can optionally prepend a {@link #setPrefix prefix} and/or append a
@@ -33,10 +33,10 @@ import org.springframework.web.servlet.HandlerMapping;
* <p>Find below some examples:
*
* <ol>
* <li><code>"/index" -> "index"</code></li>
* <li><code>"/index.html" -> "index"</code></li>
* <li><code>"/index.html"</code> + prefix <code>"pre_"</code> and suffix <code>"_suf" -> "pre_index_suf"</code></li>
* <li><code>"/products/view.html" -> "products/view"</code></li>
* <li>{@code "/index" -> "index"}</li>
* <li>{@code "/index.html" -> "index"}</li>
* <li>{@code "/index.html"} + prefix {@code "pre_"} and suffix {@code "_suf" -> "pre_index_suf"}</li>
* <li>{@code "/products/view.html" -> "products/view"}</li>
* </ol>
*
* <p>Thanks to David Barri for suggesting prefix/suffix support!
@@ -118,8 +118,8 @@ public class UrlFilenameViewController extends AbstractUrlViewController {
/**
* Returns view name based on the URL filename,
* with prefix/suffix applied when appropriate.
* @param uri the request URI; for example <code>"/index.html"</code>
* @return the extracted URI filename; for example <code>"index"</code>
* @param uri the request URI; for example {@code "/index.html"}
* @return the extracted URI filename; for example {@code "index"}
* @see #extractViewNameFromUrlPath
* @see #postProcessViewName
*/
@@ -135,8 +135,8 @@ public class UrlFilenameViewController extends AbstractUrlViewController {
/**
* Extract the URL filename from the given request URI.
* @param uri the request URI; for example <code>"/index.html"</code>
* @return the extracted URI filename; for example <code>"index"</code>
* @param uri the request URI; for example {@code "/index.html"}
* @return the extracted URI filename; for example {@code "index"}
*/
protected String extractViewNameFromUrlPath(String uri) {
int start = (uri.charAt(0) == '/' ? 1 : 0);

View File

@@ -168,7 +168,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
* and various Ant-style pattern matches, e.g. a registered "/t*" matches
* both "/test" and "/team". For details, see the AntPathMatcher class.
* @param urlPath URL the bean is mapped to
* @return the associated cache seconds, or <code>null</code> if not found
* @return the associated cache seconds, or {@code null} if not found
* @see org.springframework.util.AntPathMatcher
*/
protected Integer lookupCacheSeconds(String urlPath) {

View File

@@ -247,7 +247,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Set the MethodNameResolver to use for resolving default handler methods
* (carrying an empty <code>@RequestMapping</code> annotation).
* (carrying an empty {@code @RequestMapping} annotation).
* <p>Will only kick in when the handler method cannot be resolved uniquely
* through the annotation metadata already.
*/
@@ -274,11 +274,11 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
}
/**
* Cache content produced by <code>@SessionAttributes</code> annotated handlers
* Cache content produced by {@code @SessionAttributes} annotated handlers
* for the given number of seconds. Default is 0, preventing caching completely.
* <p>In contrast to the "cacheSeconds" property which will apply to all general handlers
* (but not to <code>@SessionAttributes</code> annotated handlers), this setting will
* apply to <code>@SessionAttributes</code> annotated handlers only.
* (but not to {@code @SessionAttributes} annotated handlers), this setting will
* apply to {@code @SessionAttributes} annotated handlers only.
* @see #setCacheSeconds
* @see org.springframework.web.bind.annotation.SessionAttributes
*/
@@ -289,13 +289,13 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
* <p>More specifically, the execution of the <code>handleRequestInternal</code>
* <p>More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* <p>The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
* by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
* by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* <p>In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
@@ -370,7 +370,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Specify the order value for this HandlerAdapter bean.
* <p>Default value is <code>Integer.MAX_VALUE</code>, meaning that it's non-ordered.
* <p>Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public void setOrder(int order) {
@@ -480,7 +480,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
* <p>The default implementation creates a standard ServletRequestDataBinder.
* This can be overridden for custom ServletRequestDataBinder subclasses.
* @param request current HTTP request
* @param target the target object to bind onto (or <code>null</code>
* @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the objectName of the target object
* @return the ServletRequestDataBinder instance to use

View File

@@ -154,7 +154,7 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
* Finds the handler method that matches the thrown exception best.
* @param handler the handler object
* @param thrownException the exception to be handled
* @return the best matching method; or <code>null</code> if none is found
* @return the best matching method; or {@code null} if none is found
*/
private Method findBestExceptionHandlerMethod(Object handler, final Exception thrownException) {
final Class<?> handlerType = ClassUtils.getUserClass(handler);

View File

@@ -96,7 +96,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractDetectingUrlHandler
* Set whether to register paths using the default suffix pattern as well:
* i.e. whether "/users" should be registered as "/users.*" and "/users/" too.
* <p>Default is "true". Turn this convention off if you intend to interpret
* your <code>@RequestMapping</code> paths strictly.
* your {@code @RequestMapping} paths strictly.
* <p>Note that paths which include a ".xxx" suffix or end with "/" already will not be
* transformed using the default suffix pattern in any case.
*/

View File

@@ -59,10 +59,10 @@ public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionRes
* @param responseStatus the annotation
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen at the time of the exception
* @param handler the executed handler, or {@code null} if none chosen at the time of the exception
* (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to, or <code>null</code> for default processing
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected ModelAndView resolveResponseStatus(ResponseStatus responseStatus, HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) throws Exception {

View File

@@ -43,7 +43,7 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i
/**
* Specify the order value for this HandlerAdapter bean.
* <p>Default value is <code>Integer.MAX_VALUE</code>, meaning that it's non-ordered.
* <p>Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public void setOrder(int order) {

View File

@@ -36,7 +36,7 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
/**
* Create a new instance, with default object name.
* @param target the target object to bind onto (or <code>null</code>
* @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -46,7 +46,7 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
/**
* Create a new instance.
* @param target the target object to bind onto (or <code>null</code>
* @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
* @see #DEFAULT_OBJECT_NAME

View File

@@ -418,11 +418,11 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i
}
/**
* Cache content produced by <code>@SessionAttributes</code> annotated handlers
* Cache content produced by {@code @SessionAttributes} annotated handlers
* for the given number of seconds. Default is 0, preventing caching completely.
* <p>In contrast to the "cacheSeconds" property which will apply to all general
* handlers (but not to <code>@SessionAttributes</code> annotated handlers),
* this setting will apply to <code>@SessionAttributes</code> handlers only.
* handlers (but not to {@code @SessionAttributes} annotated handlers),
* this setting will apply to {@code @SessionAttributes} handlers only.
* @see #setCacheSeconds
* @see org.springframework.web.bind.annotation.SessionAttributes
*/
@@ -433,13 +433,13 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
* <p>More specifically, the execution of the <code>handleRequestInternal</code>
* <p>More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* <p>The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
* by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
* by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* <p>In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the

View File

@@ -1,8 +1,7 @@
/**
*
* Servlet-based infrastructure for handler method processing,
* building on the <code>org.springframework.web.method</code> package.
* building on the {@code org.springframework.web.method} package.
*
*/
package org.springframework.web.servlet.mvc.method;

View File

@@ -81,8 +81,8 @@ public abstract class AbstractUrlMethodNameResolver implements MethodNameResolve
/**
* Retrieves the URL path to use for lookup and delegates to
* <code>getHandlerMethodNameForUrlPath</code>.
* Converts <code>null</code> values to NoSuchRequestHandlingMethodExceptions.
* {@code getHandlerMethodNameForUrlPath}.
* Converts {@code null} values to NoSuchRequestHandlingMethodExceptions.
* @see #getHandlerMethodNameForUrlPath
*/
public final String getHandlerMethodName(HttpServletRequest request)
@@ -101,7 +101,7 @@ public abstract class AbstractUrlMethodNameResolver implements MethodNameResolve
/**
* Return a method name that can handle this request, based on the
* given lookup path. Called by <code>getHandlerMethodName</code>.
* given lookup path. Called by {@code getHandlerMethodName}.
* @param urlPath the URL path to use for lookup,
* according to the settings in this class
* @return a method name that can handle this request.

View File

@@ -97,7 +97,7 @@ public class InternalPathMethodNameResolver extends AbstractUrlMethodNameResolve
/**
* Extract the handler method name from the given request URI.
* Delegates to <code>WebUtils.extractViewNameFromUrlPath(String)</code>.
* Delegates to {@code WebUtils.extractViewNameFromUrlPath(String)}.
* @param uri the request URI (e.g. "/index.html")
* @return the extracted URI filename (e.g. "index")
* @see org.springframework.web.util.WebUtils#extractFilenameFromUrlPath

View File

@@ -36,7 +36,7 @@ public interface MethodNameResolver {
* mappings are typically, but not necessarily, based on URL.
* @param request current HTTP request
* @return a method name that can handle this request.
* Never returns <code>null</code>; throws exception if not resolvable.
* Never returns {@code null}; throws exception if not resolvable.
* @throws NoSuchRequestHandlingMethodException if no handler method
* can be found for the given request
*/

View File

@@ -68,21 +68,21 @@ import org.springframework.web.servlet.mvc.LastModified;
* {@link org.springframework.web.servlet.RequestToViewNameTranslator} will be
* used to determine the view name.
*
* <p>When returning <code>void</code> a return value of <code>null</code> is
* <p>When returning {@code void} a return value of {@code null} is
* assumed meaning that the handler method is responsible for writing the
* response directly to the supplied {@link HttpServletResponse}.
*
* <p>This model allows for rapid coding, but loses the advantage of
* compile-time checking. It is similar to a Struts <code>DispatchAction</code>,
* compile-time checking. It is similar to a Struts {@code DispatchAction},
* but more sophisticated. Also supports delegation to another object.
*
* <p>An implementation of the {@link MethodNameResolver} interface defined in
* this package should return a method name for a given request, based on any
* aspect of the request, such as its URL or an "action" parameter. The actual
* strategy can be configured via the "methodNameResolver" bean property, for
* each <code>MultiActionController</code>.
* each {@code MultiActionController}.
*
* <p>The default <code>MethodNameResolver</code> is
* <p>The default {@code MethodNameResolver} is
* {@link InternalPathMethodNameResolver}; further included strategies are
* {@link PropertiesMethodNameResolver} and {@link ParameterMethodNameResolver}.
*
@@ -94,13 +94,13 @@ import org.springframework.web.servlet.mvc.LastModified;
* The third parameter can be any subclass or {@link Exception} or
* {@link RuntimeException}.
*
* <p>There can also be an optional <code>xxxLastModified</code> method for
* <p>There can also be an optional {@code xxxLastModified} method for
* handlers, of signature:
*
* <pre class="code">public long anyMeaningfulNameLastModified(HttpServletRequest request)</pre>
*
* If such a method is present, it will be invoked. Default return from
* <code>getLastModified</code> is -1, meaning that the content must always be
* {@code getLastModified} is -1, meaning that the content must always be
* regenerated.
*
* <p><b>Note that all handler methods need to be public and that
@@ -172,7 +172,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Constructor for <code>MultiActionController</code> that looks for
* Constructor for {@code MultiActionController} that looks for
* handler methods in the present subclass.
*/
public MultiActionController() {
@@ -182,7 +182,7 @@ public class MultiActionController extends AbstractController implements LastMod
}
/**
* Constructor for <code>MultiActionController</code> that looks for
* Constructor for {@code MultiActionController} that looks for
* handler methods in delegate, rather than a subclass of this class.
* @param delegate handler object. This does not need to implement any
* particular interface, as everything is done using reflection.
@@ -193,7 +193,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Set the delegate used by this class; the default is <code>this</code>,
* Set the delegate used by this class; the default is {@code this},
* assuming that handler methods have been added by a subclass.
* <p>This method does not get invoked once the class is configured.
* @param delegate an object containing handler methods
@@ -226,7 +226,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Set the {@link Validator Validators} for this controller.
* <p>The <code>Validators</code> must support the specified command class.
* <p>The {@code Validators} must support the specified command class.
*/
public final void setValidators(Validator[] validators) {
this.validators = validators;
@@ -283,7 +283,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Is the supplied method a valid handler method?
* <p>Does not consider <code>Controller.handleRequest</code> itself
* <p>Does not consider {@code Controller.handleRequest} itself
* as handler method (to avoid potential stack overflow).
*/
private boolean isHandlerMethod(Method method) {
@@ -420,7 +420,7 @@ public class MultiActionController extends AbstractController implements LastMod
* @param ex the NoSuchRequestHandlingMethodException to be handled
* @param request current HTTP request
* @param response current HTTP response
* @return a ModelAndView to render, or <code>null</code> if handled directly
* @return a ModelAndView to render, or {@code null} if handled directly
* @throws Exception an Exception that should be thrown as result of the servlet request
*/
protected ModelAndView handleNoSuchRequestHandlingMethod(
@@ -483,7 +483,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Processes the return value of a handler method to ensure that it either returns
* <code>null</code> or an instance of {@link ModelAndView}. When returning a {@link Map},
* {@code null} or an instance of {@link ModelAndView}. When returning a {@link Map},
* the {@link Map} instance is wrapped in a new {@link ModelAndView} instance.
*/
@SuppressWarnings("unchecked")
@@ -507,7 +507,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Create a new command object of the given class.
* <p>This implementation uses <code>BeanUtils.instantiateClass</code>,
* <p>This implementation uses {@code BeanUtils.instantiateClass},
* so commands need to have public no-arg constructors.
* Subclasses can override this implementation if desired.
* @throws Exception if the command object could not be instantiated
@@ -542,10 +542,10 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Create a new binder instance for the given command and request.
* <p>Called by <code>bind</code>. Can be overridden to plug in custom
* <p>Called by {@code bind}. Can be overridden to plug in custom
* ServletRequestDataBinder subclasses.
* <p>The default implementation creates a standard ServletRequestDataBinder,
* and invokes <code>initBinder</code>. Note that <code>initBinder</code>
* and invokes {@code initBinder}. Note that {@code initBinder}
* will not be invoked if you override this method!
* @param request current HTTP request
* @param command the command to bind onto
@@ -573,7 +573,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Initialize the given binder instance, for example with custom editors.
* Called by <code>createBinder</code>.
* Called by {@code createBinder}.
* <p>This method allows you to register custom editors for certain fields of your
* command class. For instance, you will be able to transform Date objects into a
* String pattern and back, in order to allow your JavaBeans to have Date properties
@@ -597,8 +597,8 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Determine the exception handler method for the given exception.
* <p>Can return <code>null</code> if not found.
* @return a handler for the given exception type, or <code>null</code>
* <p>Can return {@code null} if not found.
* @return a handler for the given exception type, or {@code null}
* @param exception the exception to handle
*/
protected Method getExceptionHandler(Throwable exception) {

View File

@@ -33,14 +33,14 @@ import org.springframework.web.util.WebUtils;
*
* <p>The simplest strategy looks for a specific named parameter, whose value is
* considered the name of the method to invoke. The name of the parameter may be
* specified as a JavaBean property, if the default <code>action</code> is not
* specified as a JavaBean property, if the default {@code action} is not
* acceptable.
*
* <p>The alternative strategy uses the very existence of a request parameter (
* i.e. a request parameter with a certain name is found) as an indication that a
* method with the same name should be dispatched to. In this case, the actual
* request parameter value is ignored. The list of parameter/method names may
* be set via the <code>methodParamNames<code> JavaBean property.
* be set via the {@code methodParamNames} JavaBean property.
*
* <p>The second resolution strategy is primarily expected to be used with web
* pages containing multiple submit buttons. The 'name' attribute of each
@@ -52,7 +52,7 @@ import org.springframework.web.util.WebUtils;
* type 'image'. That is, an image submit button named 'reset' will normally be
* submitted by the browser as two request paramters called 'reset.x', and
* 'reset.y'. When checking for the existence of a paramter from the
* <code>methodParamNames</code> list, to indicate that a specific method should
* {@code methodParamNames} list, to indicate that a specific method should
* be called, the code will look for request parameter in the "reset" form
* (exactly as spcified in the list), and in the "reset.x" form ('.x' appended to
* the name in the list). In this way it can handle both normal and image submit

View File

@@ -26,14 +26,14 @@ import org.springframework.util.PathMatcher;
/**
* The most flexible out-of-the-box implementation of the {@link MethodNameResolver}
* interface. Uses <code>java.util.Properties</code> to define the mapping
* interface. Uses {@code java.util.Properties} to define the mapping
* between the URL of incoming requests and the corresponding method name.
* Such properties can be held in an XML document.
*
* <p>Properties format is
* <code>
* {@code
* /welcome.html=displayGenresPage
* </code>
* }
* Note that method overloading isn't allowed, so there's no need to
* specify arguments.
*

View File

@@ -1,4 +1,3 @@
/**
*
* <p>
@@ -8,9 +7,9 @@
* </p>
*
* <p>
* A <code>Controller</code> - as defined in this package - is analogous to a Struts
* <code>Action</code>. Usually <code>Controllers</code> are JavaBeans
* to allow easy configuration. Controllers define the <code>C</code> from so-called
* A {@code Controller} - as defined in this package - is analogous to a Struts
* {@code Action}. Usually {@code Controllers} are JavaBeans
* to allow easy configuration. Controllers define the {@code C} from so-called
* MVC paradigm and can be used in conjunction with the
* {@link org.springframework.web.servlet.ModelAndView ModelAndView}
* to achieve interactive applications. The view might be represented by a

View File

@@ -77,7 +77,7 @@ public abstract class AbstractControllerUrlHandlerMapping extends AbstractDetect
/**
* This implementation delegates to {@link #buildUrlsForHandler},
* provided that {@link #isEligibleForMapping} returns <code>true</code>.
* provided that {@link #isEligibleForMapping} returns {@code true}.
*/
@Override
protected String[] determineUrlsForHandler(String beanName) {

View File

@@ -21,7 +21,7 @@ import org.springframework.stereotype.Controller;
/**
* Extension of {@link ControllerTypePredicate} that detects
* annotated <code>@Controller</code/> beans as well.
* annotated {@code @Controller} beans as well.
*
* @author Juergen Hoeller
* @since 2.5.3

View File

@@ -25,7 +25,7 @@ import org.springframework.util.StringUtils;
* Implementation of {@link org.springframework.web.servlet.HandlerMapping} that
* follows a simple convention for generating URL path mappings from the <i>bean names</i>
* of registered {@link org.springframework.web.servlet.mvc.Controller} beans
* as well as <code>@Controller</code> annotated beans.
* as well as {@code @Controller} annotated beans.
*
* <p>This is similar to {@link org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping}
* but doesn't expect bean names to follow the URL convention: It turns plain bean names

View File

@@ -24,24 +24,24 @@ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
* Implementation of {@link org.springframework.web.servlet.HandlerMapping} that
* follows a simple convention for generating URL path mappings from the <i>class names</i>
* of registered {@link org.springframework.web.servlet.mvc.Controller} beans
* as well as <code>@Controller</code> annotated beans.
* as well as {@code @Controller} annotated beans.
*
* <p>For simple {@link org.springframework.web.servlet.mvc.Controller} implementations
* (those that handle a single request type), the convention is to take the
* {@link ClassUtils#getShortName short name} of the <code>Class</code>,
* {@link ClassUtils#getShortName short name} of the {@code Class},
* remove the 'Controller' suffix if it exists and return the remaining text, lower-cased,
* as the mapping, with a leading <code>/</code>. For example:
* as the mapping, with a leading {@code /}. For example:
* <ul>
* <li><code>WelcomeController</code> -> <code>/welcome*</code></li>
* <li><code>HomeController</code> -> <code>/home*</code></li>
* <li>{@code WelcomeController} -> {@code /welcome*}</li>
* <li>{@code HomeController} -> {@code /home*}</li>
* </ul>
*
* <p>For {@link MultiActionController MultiActionControllers} and <code>@Controller</code>
* <p>For {@link MultiActionController MultiActionControllers} and {@code @Controller}
* beans, a similar mapping is registered, except that all sub-paths are registered
* using the trailing wildcard pattern <code>/*</code>. For example:
* using the trailing wildcard pattern {@code /*}. For example:
* <ul>
* <li><code>WelcomeController</code> -> <code>/welcome</code>, <code>/welcome/*</code></li>
* <li><code>CatalogController</code> -> <code>/catalog</code>, <code>/catalog/*</code></li>
* <li>{@code WelcomeController} -> {@code /welcome}, {@code /welcome/*}</li>
* <li>{@code CatalogController} -> {@code /catalog}, {@code /catalog/*}</li>
* </ul>
*
* <p>For {@link MultiActionController} it is often useful to use
@@ -104,7 +104,7 @@ public class ControllerClassNameHandlerMapping extends AbstractControllerUrlHand
/**
* Set the base package to be used for generating path mappings,
* including all subpackages underneath this packages as path elements.
* <p>Default is <code>null</code>, using the short class name for the
* <p>Default is {@code null}, using the short class name for the
* generated path, with the controller's package not represented in the path.
* Specify a base package like "com.mycompany.myapp" to include subpackages
* within that base package as path elements, e.g. generating the path

View File

@@ -162,7 +162,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
* @param ex the NoSuchRequestHandlingMethodException to be handled
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen
* @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return an empty ModelAndView indicating the exception was handled
* @throws IOException potentially thrown from response.sendError()
@@ -183,7 +183,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
* @param ex the HttpRequestMethodNotSupportedException to be handled
* @param request current HTTP request
* @param response current HTTP response
* @param handler the executed handler, or <code>null</code> if none chosen
* @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return an empty ModelAndView indicating the exception was handled
* @throws IOException potentially thrown from response.sendError()

View File

@@ -196,7 +196,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
/**
* Determine an appropriate media type for the given resource.
* @param resource the resource to check
* @return the corresponding media type, or <code>null</code> if none found
* @return the corresponding media type, or {@code null} if none found
*/
protected MediaType getMediaType(Resource resource) {
MediaType mediaType = null;
@@ -217,8 +217,8 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
* Set headers on the given servlet response.
* Called for GET requests as well as HEAD requests.
* @param response current servlet response
* @param resource the identified resource (never <code>null</code>)
* @param mediaType the resource's media type (never <code>null</code>)
* @param resource the identified resource (never {@code null})
* @param mediaType the resource's media type (never {@code null})
* @throws IOException in case of errors while setting the headers
*/
protected void setHeaders(HttpServletResponse response, Resource resource, MediaType mediaType) throws IOException {
@@ -237,7 +237,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
* Write the actual content out to the given servlet response,
* streaming the resource's content.
* @param response current servlet response
* @param resource the identified resource (never <code>null</code>)
* @param resource the identified resource (never {@code null})
* @throws IOException in case of errors while writing the content
*/
protected void writeContent(HttpServletResponse response, Resource resource) throws IOException {

View File

@@ -190,7 +190,7 @@ public class BindStatus {
/**
* Return a bind expression that can be used in HTML forms as input name
* for the respective field, or <code>null</code> if not field-specific.
* for the respective field, or {@code null} if not field-specific.
* <p>Returns a bind path appropriate for resubmission, e.g. "address.street".
* Note that the complete bind path as required by the bind tag is
* "customer.address.street", if bound to a "customer" bean.
@@ -201,7 +201,7 @@ public class BindStatus {
/**
* Return the current value of the field, i.e. either the property value
* or a rejected update, or <code>null</code> if not field-specific.
* or a rejected update, or {@code null} if not field-specific.
* <p>This value will be an HTML-escaped String if the original value
* already was a String.
*/
@@ -210,9 +210,9 @@ public class BindStatus {
}
/**
* Get the '<code>Class</code>' type of the field. Favor this instead of
* '<code>getValue().getClass()</code>' since '<code>getValue()</code>' may
* return '<code>null</code>'.
* Get the '{@code Class}' type of the field. Favor this instead of
* '{@code getValue().getClass()}' since '{@code getValue()}' may
* return '{@code null}'.
*/
public Class getValueType() {
return this.valueType;
@@ -220,7 +220,7 @@ public class BindStatus {
/**
* Return the actual value of the field, i.e. the raw property value,
* or <code>null</code> if not available.
* or {@code null} if not available.
*/
public Object getActualValue() {
return this.actualValue;
@@ -230,7 +230,7 @@ public class BindStatus {
* Return a suitable display value for the field, i.e. the stringified
* value if not null, and an empty string in case of a null value.
* <p>This value will be an HTML-escaped String if the original value
* was non-null: the <code>toString</code> result of the original value
* was non-null: the {@code toString} result of the original value
* will get HTML-escaped.
*/
public String getDisplayValue() {
@@ -296,7 +296,7 @@ public class BindStatus {
/**
* Return the Errors instance (typically a BindingResult) that this
* bind status is currently associated with.
* @return the current Errors instance, or <code>null</code> if none
* @return the current Errors instance, or {@code null} if none
* @see org.springframework.validation.BindingResult
*/
public Errors getErrors() {
@@ -306,7 +306,7 @@ public class BindStatus {
/**
* Return the PropertyEditor for the property that this bind status
* is currently bound to.
* @return the current PropertyEditor, or <code>null</code> if none
* @return the current PropertyEditor, or {@code null} if none
*/
public PropertyEditor getEditor() {
return this.editor;
@@ -316,7 +316,7 @@ public class BindStatus {
* Find a PropertyEditor for the given value class, associated with
* the property that this bound status is currently bound to.
* @param valueClass the value class that an editor is needed for
* @return the associated PropertyEditor, or <code>null</code> if none
* @return the associated PropertyEditor, or {@code null} if none
*/
public PropertyEditor findEditor(Class valueClass) {
return (this.bindingResult != null ? this.bindingResult.findEditor(this.expression, valueClass) : null);

View File

@@ -25,7 +25,7 @@ import javax.servlet.jsp.jstl.core.Config;
/**
* JSP-aware (and JSTL-aware) subclass of RequestContext, allowing for
* population of the context from a <code>javax.servlet.jsp.PageContext</code>.
* population of the context from a {@code javax.servlet.jsp.PageContext}.
*
* <p>This context will detect a JSTL locale attribute in page/request/session/application
* scope, in addition to the fallback locale strategy provided by the base class.
@@ -53,7 +53,7 @@ public class JspAwareRequestContext extends RequestContext {
* using the given model attributes for Errors retrieval.
* @param pageContext current JSP page context
* @param model the model attributes for the current view
* (can be <code>null</code>, using the request attributes for Errors retrieval)
* (can be {@code null}, using the request attributes for Errors retrieval)
*/
public JspAwareRequestContext(PageContext pageContext, Map<String, Object> model) {
initContext(pageContext, model);
@@ -64,7 +64,7 @@ public class JspAwareRequestContext extends RequestContext {
* using the given model attributes for Errors retrieval.
* @param pageContext current JSP page context
* @param model the model attributes for the current view
* (can be <code>null</code>, using the request attributes for Errors retrieval)
* (can be {@code null}, using the request attributes for Errors retrieval)
*/
protected void initContext(PageContext pageContext, Map<String, Object> model) {
if (!(pageContext.getRequest() instanceof HttpServletRequest)) {
@@ -87,7 +87,7 @@ public class JspAwareRequestContext extends RequestContext {
/**
* This implementation checks for a JSTL locale attribute
* in page, request, session or application scope; if not found,
* returns the <code>HttpServletRequest.getLocale()</code>.
* returns the {@code HttpServletRequest.getLocale()}.
*/
@Override
protected Locale getFallbackLocale() {

View File

@@ -43,7 +43,7 @@ public abstract class JstlUtils {
* context-param and creates a corresponding child message source,
* with the provided Spring-defined MessageSource as parent.
* @param servletContext the ServletContext we're running in
* (to check JSTL-related context-params in <code>web.xml</code>)
* (to check JSTL-related context-params in {@code web.xml})
* @param messageSource the MessageSource to expose, typically
* the ApplicationContext of the current DispatcherServlet
* @return the MessageSource to expose to JSTL; first checking the
@@ -74,7 +74,7 @@ public abstract class JstlUtils {
* using Spring's locale and MessageSource.
* @param request the current HTTP request
* @param messageSource the MessageSource to expose,
* typically the current ApplicationContext (may be <code>null</code>)
* typically the current ApplicationContext (may be {@code null})
* @see #exposeLocalizationContext(RequestContext)
*/
public static void exposeLocalizationContext(HttpServletRequest request, MessageSource messageSource) {

View File

@@ -130,7 +130,7 @@ public class RequestContext {
* request attributes. It will typically be used within JSPs or custom tags. <p>If a ServletContext is specified,
* the RequestContext will also work with the root WebApplicationContext (outside a DispatcherServlet).
* @param request current HTTP request
* @param servletContext the servlet context of the web application (can be <code>null</code>; necessary for
* @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
* @see org.springframework.web.context.WebApplicationContext
* @see org.springframework.web.servlet.DispatcherServlet
@@ -145,7 +145,7 @@ public class RequestContext {
* within a DispatcherServlet request.</b> 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 <code>null</code>, using the request attributes
* @param model the model attributes for the current view (can be {@code 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)
@@ -160,9 +160,9 @@ public class RequestContext {
* specified, the RequestContext will also work with a root WebApplicationContext (outside a DispatcherServlet).
* @param request current HTTP request
* @param response current HTTP response
* @param servletContext the servlet context of the web application (can be <code>null</code>; necessary for
* @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
* @param model the model attributes for the current view (can be <code>null</code>, using the request attributes
* @param model the model attributes for the current view (can be {@code null}, using the request attributes
* for Errors retrieval)
* @see org.springframework.web.context.WebApplicationContext
* @see org.springframework.web.servlet.DispatcherServlet
@@ -181,12 +181,12 @@ public class RequestContext {
/**
* Initialize this context with the given request, using the given model attributes for Errors retrieval.
* <p>Delegates to <code>getFallbackLocale</code> and <code>getFallbackTheme</code> for determining the fallback
* <p>Delegates to {@code getFallbackLocale} and {@code getFallbackTheme} for determining the fallback
* locale and theme, respectively, if no LocaleResolver and/or ThemeResolver can be found in the request.
* @param request current HTTP request
* @param servletContext the servlet context of the web application (can be <code>null</code>; necessary for
* @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
* @param model the model attributes for the current view (can be <code>null</code>, using the request attributes
* @param model the model attributes for the current view (can be {@code null}, using the request attributes
* for Errors retrieval)
* @see #getFallbackLocale
* @see #getFallbackTheme
@@ -234,8 +234,8 @@ public class RequestContext {
/**
* Determine the fallback locale for this context. <p>The default implementation checks for a JSTL locale attribute
* in request, session or application scope; if not found, returns the <code>HttpServletRequest.getLocale()</code>.
* @return the fallback locale (never <code>null</code>)
* in request, session or application scope; if not found, returns the {@code HttpServletRequest.getLocale()}.
* @return the fallback locale (never {@code null})
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/
protected Locale getFallbackLocale() {
@@ -251,7 +251,7 @@ public class RequestContext {
/**
* Determine the fallback theme for this context. <p>The default implementation returns the default theme (with name
* "theme").
* @return the fallback theme (never <code>null</code>)
* @return the fallback theme (never {@code null})
*/
protected Theme getFallbackTheme() {
ThemeSource themeSource = RequestContextUtils.getThemeSource(getRequest());
@@ -295,21 +295,21 @@ public class RequestContext {
/**
* Return the model Map that this RequestContext encapsulates, if any.
* @return the populated model Map, or <code>null</code> if none available
* @return the populated model Map, or {@code null} if none available
*/
public final Map<String, Object> getModel() {
return this.model;
}
/**
* Return the current Locale (never <code>null</code>).
* Return the current Locale (never {@code null}).
*/
public final Locale getLocale() {
return this.locale;
}
/**
* Return the current theme (never <code>null</code>). <p>Resolved lazily for more efficiency when theme support is
* Return the current theme (never {@code null}). <p>Resolved lazily for more efficiency when theme support is
* not being used.
*/
public final Theme getTheme() {
@@ -334,7 +334,7 @@ public class RequestContext {
}
/**
* Is default HTML escaping active? Falls back to <code>false</code> in case of no explicit default given.
* Is default HTML escaping active? Falls back to {@code false} in case of no explicit default given.
*/
public boolean isDefaultHtmlEscape() {
return (this.defaultHtmlEscape != null && this.defaultHtmlEscape.booleanValue());
@@ -399,9 +399,9 @@ public class RequestContext {
}
/**
* Return a context-aware URl for the given relative URL with placeholders (named keys with braces <code>{}</code>).
* For example, send in a relative URL <code>foo/{bar}?spam={spam}</code> and a parameter map
* <code>{bar=baz,spam=nuts}</code> and the result will be <code>[contextpath]/foo/baz?spam=nuts</code>.
* Return a context-aware URl for the given relative URL with placeholders (named keys with braces {@code {}}).
* For example, send in a relative URL {@code foo/{bar}?spam={spam}} and a parameter map
* {@code {bar=baz,spam=nuts}} and the result will be {@code [contextpath]/foo/baz?spam=nuts}.
*
* @param relativeUrl the relative URL part
* @param params a map of parameters to insert as placeholders in the url
@@ -473,7 +473,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -484,7 +484,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
* @param args arguments for the message as a List, or <code>null</code> if none
* @param args arguments for the message as a List, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -495,7 +495,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @param htmlEscape HTML escape the message?
* @return the message
@@ -518,7 +518,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -529,7 +529,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
* @param args arguments for the message as a List, or <code>null</code> if none
* @param args arguments for the message as a List, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -540,7 +540,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @param htmlEscape HTML escape the message?
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
@@ -587,7 +587,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. <p>Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -599,7 +599,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. <p>Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
* @param args arguments for the message as a List, or <code>null</code> if none
* @param args arguments for the message as a List, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -623,7 +623,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. <p>Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
* @param args arguments for the message, or <code>null</code> if none
* @param args arguments for the message, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -635,7 +635,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. <p>Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
* @param args arguments for the message as a List, or <code>null</code> if none
* @param args arguments for the message as a List, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -657,7 +657,7 @@ public class RequestContext {
/**
* Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.
* @param name name of the bind object
* @return the Errors instance, or <code>null</code> if not found
* @return the Errors instance, or {@code null} if not found
*/
public Errors getErrors(String name) {
return getErrors(name, isDefaultHtmlEscape());
@@ -667,7 +667,7 @@ public class RequestContext {
* Retrieve the Errors instance for the given bind object.
* @param name name of the bind object
* @param htmlEscape create an Errors instance with automatic HTML escaping?
* @return the Errors instance, or <code>null</code> if not found
* @return the Errors instance, or {@code null} if not found
*/
public Errors getErrors(String name, boolean htmlEscape) {
if (this.errorsMap == null) {

View File

@@ -91,7 +91,7 @@ public abstract class RequestContextUtils {
* Return the LocaleResolver that has been bound to the request by the
* DispatcherServlet.
* @param request current HTTP request
* @return the current LocaleResolver, or <code>null</code> if not found
* @return the current LocaleResolver, or {@code null} if not found
*/
public static LocaleResolver getLocaleResolver(HttpServletRequest request) {
return (LocaleResolver) request.getAttribute(DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE);
@@ -121,7 +121,7 @@ public abstract class RequestContextUtils {
* Return the ThemeResolver that has been bound to the request by the
* DispatcherServlet.
* @param request current HTTP request
* @return the current ThemeResolver, or <code>null</code> if not found
* @return the current ThemeResolver, or {@code null} if not found
*/
public static ThemeResolver getThemeResolver(HttpServletRequest request) {
return (ThemeResolver) request.getAttribute(DispatcherServlet.THEME_RESOLVER_ATTRIBUTE);
@@ -141,7 +141,7 @@ public abstract class RequestContextUtils {
* Retrieves the current theme from the given request, using the ThemeResolver
* and ThemeSource bound to the request by the DispatcherServlet.
* @param request current HTTP request
* @return the current theme, or <code>null</code> if not found
* @return the current theme, or {@code null} if not found
* @see #getThemeResolver
*/
public static Theme getTheme(HttpServletRequest request) {

View File

@@ -90,9 +90,9 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Create a new WebContentGenerator.
* @param restrictDefaultSupportedMethods <code>true</code> if this
* @param restrictDefaultSupportedMethods {@code true} if this
* generator should support HTTP methods GET, HEAD and POST by default,
* or <code>false</code> if it should be unrestricted
* or {@code false} if it should be unrestricted
*/
public WebContentGenerator(boolean restrictDefaultSupportedMethods) {
if (restrictDefaultSupportedMethods) {
@@ -265,7 +265,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Prevent the response from being cached.
* See <code>http://www.mnot.net/cache_docs</code>.
* See {@code http://www.mnot.net/cache_docs}.
*/
protected final void preventCaching(HttpServletResponse response) {
response.setHeader(HEADER_PRAGMA, "no-cache");
@@ -298,7 +298,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Set HTTP headers to allow caching for the given number of seconds.
* Tells the browser to revalidate the resource if mustRevalidate is
* <code>true</code>.
* {@code true}.
* @param response the current HTTP response
* @param seconds number of seconds into the future that the response
* should be cacheable for

View File

@@ -152,10 +152,10 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag {
/**
* Retrieve the property that this tag is currently bound to,
* or <code>null</code> if bound to an object rather than a specific property.
* or {@code null} if bound to an object rather than a specific property.
* Intended for cooperating nesting tags.
* @return the property that this tag is currently bound to,
* or <code>null</code> if none
* or {@code null} if none
*/
public final String getProperty() {
return this.status.getExpression();
@@ -164,7 +164,7 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag {
/**
* Retrieve the Errors instance that this tag is currently bound to.
* Intended for cooperating nesting tags.
* @return the current Errors instance, or <code>null</code> if none
* @return the current Errors instance, or {@code null} if none
*/
public final Errors getErrors() {
return this.status.getErrors();

View File

@@ -34,7 +34,7 @@ public interface EditorAwareTag {
/**
* Retrieve the PropertyEditor for the property that this tag is
* currently bound to. Intended for cooperating nesting tags.
* @return the current PropertyEditor, or <code>null</code> if none
* @return the current PropertyEditor, or {@code null} if none
* @throws JspException if resolving the editor failed
*/
PropertyEditor getEditor() throws JspException;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.util.ExpressionEvaluationUtils;
* <p>Provides a "htmlEscape" property for explicitly specifying whether to
* apply HTML escaping. If not set, a page-level default (e.g. from the
* HtmlEscapeTag) or an application-wide default (the "defaultHtmlEscape"
* context-param in <code>web.xml</code>) is used.
* context-param in {@code web.xml}) is used.
*
* @author Juergen Hoeller
* @since 1.1
@@ -66,7 +66,7 @@ public abstract class HtmlEscapingAwareTag extends RequestContextAwareTag {
/**
* Return the applicable default HTML escape setting for this tag.
* <p>The default implementation checks the RequestContext's setting,
* falling back to <code>false</code> in case of no explicit default given.
* falling back to {@code false} in case of no explicit default given.
* @see #getRequestContext()
*/
protected boolean isDefaultHtmlEscape() {

View File

@@ -37,7 +37,7 @@ import org.springframework.web.util.TagUtils;
* resolved using the ApplicationContext and thus support internationalization.
*
* <p>Detects an HTML escaping setting, either on this tag instance, the page level,
* or the <code>web.xml</code> level. Can also apply JavaScript escaping.
* or the {@code web.xml} level. Can also apply JavaScript escaping.
*
* <p>If "code" isn't set or cannot be resolved, "text" will be used as default
* message. Thus, this tag can also be used for HTML escaping of any texts.

View File

@@ -17,7 +17,7 @@
package org.springframework.web.servlet.tags;
/**
* Allows implementing tag to utilize nested <code>spring:param</code> tags.
* Allows implementing tag to utilize nested {@code spring:param} tags.
*
* @author Scott Andrews
* @since 3.0
@@ -28,7 +28,7 @@ public interface ParamAware {
/**
* Callback hook for nested spring:param tags to pass their value
* to the parent tag.
* @param param the result of the nested <code>spring:param</code> tag
* @param param the result of the nested {@code spring:param} tag
*/
void addParam(Param param);

View File

@@ -30,7 +30,7 @@ import org.springframework.web.servlet.support.RequestContext;
/**
* Superclass for all tags that require a {@link RequestContext}.
*
* <p>The <code>RequestContext</code> instance provides easy access
* <p>The {@code RequestContext} instance provides easy access
* to current state like the
* {@link org.springframework.web.context.WebApplicationContext},
* the {@link java.util.Locale}, the
@@ -38,7 +38,7 @@ import org.springframework.web.servlet.support.RequestContext;
*
* <p>Mainly intended for
* {@link org.springframework.web.servlet.DispatcherServlet} requests;
* will use fallbacks when used outside <code>DispatcherServlet</code>.
* will use fallbacks when used outside {@code DispatcherServlet}.
*
* @author Rod Johnson
* @author Juergen Hoeller

View File

@@ -28,7 +28,7 @@ import org.springframework.web.util.TagUtils;
/**
* Tag for transforming reference data values from form controllers and
* other objects inside a <code>spring:bind</code> tag (or a data-bound
* other objects inside a {@code spring:bind} tag (or a data-bound
* form element tag from Spring's form tag library).
*
* <p>The BindTag has a PropertyEditor that it uses to transform properties of

View File

@@ -61,7 +61,7 @@ import org.springframework.web.util.UriUtils;
*
* <p>URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(String)
* 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on
* this tag instance, the page level, or the <code>web.xml</code> level. The default
* this tag instance, the page level, or the {@code web.xml} level. The default
* is 'false'. When setting the URL value into a variable, escaping is not recommended.
*
* <p>Example usage:
@@ -69,7 +69,7 @@ import org.springframework.web.util.UriUtils;
* &lt;spring:param name="variableName" value="more than JSTL c:url" /&gt;
* &lt;/spring:url&gt;</pre>
* Results in:
* <code>/currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl</code>
* {@code /currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl}
*
* @author Scott Andrews
* @since 3.0

View File

@@ -20,8 +20,8 @@ import javax.servlet.jsp.JspException;
/**
* Abstract base class to provide common methods for
* implementing databinding-aware JSP tags for rendering an HTML '<code>input</code>'
* element with a '<code>type</code>' of '<code>checkbox</code>' or '<code>radio</code>'.
* implementing databinding-aware JSP tags for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code checkbox}' or '{@code radio}'.
*
* @author Thomas Risberg
* @author Juergen Hoeller
@@ -31,8 +31,8 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElementTag {
/**
* Render the '<code>input(checkbox)</code>' with the supplied value, marking the
* '<code>input</code>' element as 'checked' if the supplied value matches the
* Render the '{@code input(checkbox)}' with the supplied value, marking the
* '{@code input}' element as 'checked' if the supplied value matches the
* bound value.
*/
protected void renderFromValue(Object value, TagWriter tagWriter) throws JspException {
@@ -40,8 +40,8 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
}
/**
* Render the '<code>input(checkbox)</code>' with the supplied value, marking the
* '<code>input</code>' element as 'checked' if the supplied value matches the
* Render the '{@code input(checkbox)}' with the supplied value, marking the
* '{@code input}' element as 'checked' if the supplied value matches the
* bound value.
*/
protected void renderFromValue(Object item, Object value, TagWriter tagWriter) throws JspException {
@@ -61,9 +61,9 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
}
/**
* Render the '<code>input(checkbox)</code>' with the supplied value, marking
* the '<code>input</code>' element as 'checked' if the supplied Boolean is
* <code>true</code>.
* Render the '{@code input(checkbox)}' with the supplied value, marking
* the '{@code input}' element as 'checked' if the supplied Boolean is
* {@code true}.
*/
protected void renderFromBoolean(Boolean boundValue, TagWriter tagWriter) throws JspException {
tagWriter.writeAttribute("value", processFieldValue(getName(), "true", getInputType()));
@@ -82,8 +82,8 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
/**
* Writes the '<code>input</code>' element to the supplied
* {@link org.springframework.web.servlet.tags.form.TagWriter},
* Writes the '{@code input}' element to the supplied
* {@link TagWriter},
* marking it as 'checked' if appropriate.
*/
@Override

View File

@@ -67,7 +67,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
private String path;
/**
* The value of the '<code>id</code>' attribute.
* The value of the '{@code id}' attribute.
*/
private String id;
@@ -95,7 +95,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
* Set the value of the '<code>id</code>' attribute.
* Set the value of the '{@code id}' attribute.
* <p>May be a runtime expression; defaults to the value of {@link #getName()}.
* Note that the default value may not be valid for certain tags.
*/
@@ -105,7 +105,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
* Get the value of the '<code>id</code>' attribute.
* Get the value of the '{@code id}' attribute.
*/
@Override
public String getId() {
@@ -117,7 +117,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
* Writes the default set of attributes to the supplied {@link TagWriter}.
* Further abstract sub-classes should override this method to add in
* any additional default attributes but <strong>must</strong> remember
* to call the <code>super</code> method.
* to call the {@code super} method.
* <p>Concrete sub-classes should call this method when/if they want
* to render default attributes.
* @param tagWriter the {@link TagWriter} to which any attributes are to be written
@@ -128,7 +128,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
* Determine the '<code>id</code>' attribute value for this tag,
* Determine the '{@code id}' attribute value for this tag,
* autogenerating one if none specified.
* @see #getId()
* @see #autogenerateId()
@@ -143,7 +143,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
* Autogenerate the '<code>id</code>' attribute value for this tag.
* Autogenerate the '{@code id}' attribute value for this tag.
* <p>The default implementation simply delegates to {@link #getName()},
* deleting invalid characters (such as "[" or "]").
*/
@@ -152,13 +152,13 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
* Get the value for the HTML '<code>name</code>' attribute.
* Get the value for the HTML '{@code name}' attribute.
* <p>The default implementation simply delegates to
* {@link #getPropertyPath()} to use the property path as the name.
* For the most part this is desirable as it links with the server-side
* expectation for data binding. However, some subclasses may wish to change
* the value of the '<code>name</code>' attribute without changing the bind path.
* @return the value for the HTML '<code>name</code>' attribute
* the value of the '{@code name}' attribute without changing the bind path.
* @return the value for the HTML '{@code name}' attribute
*/
protected String getName() throws JspException {
return getPropertyPath();

View File

@@ -42,7 +42,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
/**
* Evaluate the supplied value for the supplied attribute name. If the supplied value
* is <code>null</code> then <code>null</code> is returned, otherwise evaluation is
* is {@code null} then {@code null} is returned, otherwise evaluation is
* handled using {@link ExpressionEvaluationUtils#evaluate(String, String, javax.servlet.jsp.PageContext)}.
*/
protected Object evaluate(String attributeName, Object value) throws JspException {
@@ -56,9 +56,9 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
/**
* Evaluate the supplied value for the supplied attribute name. If the supplied value
* is <code>null</code> then <code>false</code> is returned, otherwise evaluation is
* is {@code null} then {@code false} is returned, otherwise evaluation is
* handled using {@link ExpressionEvaluationUtils#evaluate(String, String, javax.servlet.jsp.PageContext)},
* with subsequent matching against <code>Boolean.TRUE</code> and <code>Boolean.valueOf</code>.
* with subsequent matching against {@code Boolean.TRUE} and {@code Boolean.valueOf}.
*/
protected boolean evaluateBoolean(String attributeName, String value) throws JspException {
Object evaluated = ExpressionEvaluationUtils.evaluate(attributeName, value, this.pageContext);
@@ -70,7 +70,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
* Optionally writes the supplied value under the supplied attribute name into the supplied
* {@link TagWriter}. In this case, the supplied value is {@link #evaluate evaluated} first
* and then the {@link ObjectUtils#getDisplayString String representation} is written as the
* attribute value. If the resultant <code>String</code> representation is <code>null</code>
* attribute value. If the resultant {@code String} representation is {@code null}
* or empty, no attribute is written.
* @see TagWriter#writeOptionalAttributeValue(String, String)
*/
@@ -103,7 +103,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
* Get the display value of the supplied <code>Object</code>, HTML escaped
* Get the display value of the supplied {@code Object}, HTML escaped
* as required. This version is <strong>not</strong> {@link PropertyEditor}-aware.
*/
protected String getDisplayString(Object value) {
@@ -111,7 +111,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
* Get the display value of the supplied <code>Object</code>, HTML escaped
* Get the display value of the supplied {@code Object}, HTML escaped
* as required. If the supplied value is not a {@link String} and the supplied
* {@link PropertyEditor} is not null then the {@link PropertyEditor} is used
* to obtain the display value.
@@ -121,7 +121,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
* Overridden to default to <code>true</code> in case of no explicit default given.
* Overridden to default to {@code true} in case of no explicit default given.
*/
@Override
protected boolean isDefaultHtmlEscape() {

View File

@@ -106,7 +106,7 @@ public abstract class AbstractHtmlElementBodyTag extends AbstractHtmlElementTag
}
/**
* Should rendering of this tag proceed at all. Returns '<code>true</code>' by default
* Should rendering of this tag proceed at all. Returns '{@code true}' by default
* causing rendering to occur always, Subclasses can override this if they
* provide conditional rendering.
*/

View File

@@ -114,7 +114,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
/**
* Set the value of the '<code>class</code>' attribute.
* Set the value of the '{@code class}' attribute.
* May be a runtime expression.
*/
public void setCssClass(String cssClass) {
@@ -122,7 +122,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>class</code>' attribute.
* Get the value of the '{@code class}' attribute.
* May be a runtime expression.
*/
protected String getCssClass() {
@@ -146,7 +146,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>style</code>' attribute.
* Set the value of the '{@code style}' attribute.
* May be a runtime expression.
*/
public void setCssStyle(String cssStyle) {
@@ -154,7 +154,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>style</code>' attribute.
* Get the value of the '{@code style}' attribute.
* May be a runtime expression.
*/
protected String getCssStyle() {
@@ -162,7 +162,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>lang</code>' attribute.
* Set the value of the '{@code lang}' attribute.
* May be a runtime expression.
*/
public void setLang(String lang) {
@@ -170,7 +170,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>lang</code>' attribute.
* Get the value of the '{@code lang}' attribute.
* May be a runtime expression.
*/
protected String getLang() {
@@ -178,7 +178,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>title</code>' attribute.
* Set the value of the '{@code title}' attribute.
* May be a runtime expression.
*/
public void setTitle(String title) {
@@ -186,7 +186,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>title</code>' attribute.
* Get the value of the '{@code title}' attribute.
* May be a runtime expression.
*/
protected String getTitle() {
@@ -194,7 +194,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>dir</code>' attribute.
* Set the value of the '{@code dir}' attribute.
* May be a runtime expression.
*/
public void setDir(String dir) {
@@ -202,7 +202,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>dir</code>' attribute.
* Get the value of the '{@code dir}' attribute.
* May be a runtime expression.
*/
protected String getDir() {
@@ -210,7 +210,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>tabindex</code>' attribute.
* Set the value of the '{@code tabindex}' attribute.
* May be a runtime expression.
*/
public void setTabindex(String tabindex) {
@@ -218,7 +218,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>tabindex</code>' attribute.
* Get the value of the '{@code tabindex}' attribute.
* May be a runtime expression.
*/
protected String getTabindex() {
@@ -226,7 +226,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onclick</code>' attribute.
* Set the value of the '{@code onclick}' attribute.
* May be a runtime expression.
*/
public void setOnclick(String onclick) {
@@ -234,7 +234,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onclick</code>' attribute.
* Get the value of the '{@code onclick}' attribute.
* May be a runtime expression.
*/
protected String getOnclick() {
@@ -242,7 +242,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>ondblclick</code>' attribute.
* Set the value of the '{@code ondblclick}' attribute.
* May be a runtime expression.
*/
public void setOndblclick(String ondblclick) {
@@ -250,7 +250,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>ondblclick</code>' attribute.
* Get the value of the '{@code ondblclick}' attribute.
* May be a runtime expression.
*/
protected String getOndblclick() {
@@ -258,7 +258,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onmousedown</code>' attribute.
* Set the value of the '{@code onmousedown}' attribute.
* May be a runtime expression.
*/
public void setOnmousedown(String onmousedown) {
@@ -266,7 +266,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onmousedown</code>' attribute.
* Get the value of the '{@code onmousedown}' attribute.
* May be a runtime expression.
*/
protected String getOnmousedown() {
@@ -274,7 +274,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onmouseup</code>' attribute.
* Set the value of the '{@code onmouseup}' attribute.
* May be a runtime expression.
*/
public void setOnmouseup(String onmouseup) {
@@ -282,7 +282,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onmouseup</code>' attribute.
* Get the value of the '{@code onmouseup}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseup() {
@@ -290,7 +290,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onmouseover</code>' attribute.
* Set the value of the '{@code onmouseover}' attribute.
* May be a runtime expression.
*/
public void setOnmouseover(String onmouseover) {
@@ -298,7 +298,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onmouseover</code>' attribute.
* Get the value of the '{@code onmouseover}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseover() {
@@ -306,7 +306,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onmousemove</code>' attribute.
* Set the value of the '{@code onmousemove}' attribute.
* May be a runtime expression.
*/
public void setOnmousemove(String onmousemove) {
@@ -314,7 +314,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onmousemove</code>' attribute.
* Get the value of the '{@code onmousemove}' attribute.
* May be a runtime expression.
*/
protected String getOnmousemove() {
@@ -322,14 +322,14 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onmouseout</code>' attribute.
* Set the value of the '{@code onmouseout}' attribute.
* May be a runtime expression.
*/
public void setOnmouseout(String onmouseout) {
this.onmouseout = onmouseout;
}
/**
* Get the value of the '<code>onmouseout</code>' attribute.
* Get the value of the '{@code onmouseout}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseout() {
@@ -337,7 +337,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onkeypress</code>' attribute.
* Set the value of the '{@code onkeypress}' attribute.
* May be a runtime expression.
*/
public void setOnkeypress(String onkeypress) {
@@ -345,7 +345,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onkeypress</code>' attribute.
* Get the value of the '{@code onkeypress}' attribute.
* May be a runtime expression.
*/
protected String getOnkeypress() {
@@ -353,7 +353,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onkeyup</code>' attribute.
* Set the value of the '{@code onkeyup}' attribute.
* May be a runtime expression.
*/
public void setOnkeyup(String onkeyup) {
@@ -361,7 +361,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onkeyup</code>' attribute.
* Get the value of the '{@code onkeyup}' attribute.
* May be a runtime expression.
*/
protected String getOnkeyup() {
@@ -369,7 +369,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Set the value of the '<code>onkeydown</code>' attribute.
* Set the value of the '{@code onkeydown}' attribute.
* May be a runtime expression.
*/
public void setOnkeydown(String onkeydown) {
@@ -377,7 +377,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
* Get the value of the '<code>onkeydown</code>' attribute.
* Get the value of the '{@code onkeydown}' attribute.
* May be a runtime expression.
*/
protected String getOnkeydown() {

View File

@@ -32,32 +32,32 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag {
/**
* The name of the '<code>onfocus</code>' attribute.
* The name of the '{@code onfocus}' attribute.
*/
public static final String ONFOCUS_ATTRIBUTE = "onfocus";
/**
* The name of the '<code>onblur</code>' attribute.
* The name of the '{@code onblur}' attribute.
*/
public static final String ONBLUR_ATTRIBUTE = "onblur";
/**
* The name of the '<code>onchange</code>' attribute.
* The name of the '{@code onchange}' attribute.
*/
public static final String ONCHANGE_ATTRIBUTE = "onchange";
/**
* The name of the '<code>accesskey</code>' attribute.
* The name of the '{@code accesskey}' attribute.
*/
public static final String ACCESSKEY_ATTRIBUTE = "accesskey";
/**
* The name of the '<code>disabled</code>' attribute.
* The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
/**
* The name of the '<code>readonly</code>' attribute.
* The name of the '{@code readonly}' attribute.
*/
public static final String READONLY_ATTRIBUTE = "readonly";
@@ -76,7 +76,7 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
/**
* Set the value of the '<code>onfocus</code>' attribute.
* Set the value of the '{@code onfocus}' attribute.
* May be a runtime expression.
*/
public void setOnfocus(String onfocus) {
@@ -84,14 +84,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Get the value of the '<code>onfocus</code>' attribute.
* Get the value of the '{@code onfocus}' attribute.
*/
protected String getOnfocus() {
return this.onfocus;
}
/**
* Set the value of the '<code>onblur</code>' attribute.
* Set the value of the '{@code onblur}' attribute.
* May be a runtime expression.
*/
public void setOnblur(String onblur) {
@@ -99,14 +99,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Get the value of the '<code>onblur</code>' attribute.
* Get the value of the '{@code onblur}' attribute.
*/
protected String getOnblur() {
return this.onblur;
}
/**
* Set the value of the '<code>onchange</code>' attribute.
* Set the value of the '{@code onchange}' attribute.
* May be a runtime expression.
*/
public void setOnchange(String onchange) {
@@ -114,14 +114,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Get the value of the '<code>onchange</code>' attribute.
* Get the value of the '{@code onchange}' attribute.
*/
protected String getOnchange() {
return this.onchange;
}
/**
* Set the value of the '<code>accesskey</code>' attribute.
* Set the value of the '{@code accesskey}' attribute.
* May be a runtime expression.
*/
public void setAccesskey(String accesskey) {
@@ -129,14 +129,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Get the value of the '<code>accesskey</code>' attribute.
* Get the value of the '{@code accesskey}' attribute.
*/
protected String getAccesskey() {
return this.accesskey;
}
/**
* Set the value of the '<code>disabled</code>' attribute.
* Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -144,14 +144,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Get the value of the '<code>disabled</code>' attribute.
* Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
}
/**
* Sets the value of the '<code>readonly</code>' attribute.
* Sets the value of the '{@code readonly}' attribute.
* May be a runtime expression.
* @see #isReadonly()
*/
@@ -160,7 +160,7 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
* Gets the value of the '<code>readonly</code>' attribute.
* Gets the value of the '{@code readonly}' attribute.
* May be a runtime expression.
* @see #isReadonly()
*/

View File

@@ -30,8 +30,8 @@ import org.springframework.util.StringUtils;
/**
* Abstract base class to provide common methods for implementing
* databinding-aware JSP tags for rendering <i>multiple</i>
* HTML '<code>input</code>' elements with a '<code>type</code>'
* of '<code>checkbox</code>' or '<code>radio</code>'.
* HTML '{@code input}' elements with a '{@code type}'
* of '{@code checkbox}' or '{@code radio}'.
*
* @author Juergen Hoeller
* @author Scott Andrews
@@ -40,42 +40,42 @@ import org.springframework.util.StringUtils;
public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElementTag {
/**
* The HTML '<code>span</code>' tag.
* The HTML '{@code span}' tag.
*/
private static final String SPAN_TAG = "span";
/**
* The {@link java.util.Collection}, {@link java.util.Map} or array of objects
* used to generate the '<code>input type="checkbox/radio"</code>' tags.
* used to generate the '{@code input type="checkbox/radio"}' tags.
*/
private Object items;
/**
* The name of the property mapped to the '<code>value</code>' attribute
* of the '<code>input type="checkbox/radio"</code>' tag.
* The name of the property mapped to the '{@code value}' attribute
* of the '{@code input type="checkbox/radio"}' tag.
*/
private String itemValue;
/**
* The value to be displayed as part of the '<code>input type="checkbox/radio"</code>' tag.
* The value to be displayed as part of the '{@code input type="checkbox/radio"}' tag.
*/
private String itemLabel;
/**
* The HTML element used to enclose the '<code>input type="checkbox/radio"</code>' tag.
* The HTML element used to enclose the '{@code input type="checkbox/radio"}' tag.
*/
private String element = SPAN_TAG;
/**
* Delimiter to use between each '<code>input type="checkbox/radio"</code>' tags.
* Delimiter to use between each '{@code input type="checkbox/radio"}' tags.
*/
private String delimiter;
/**
* Set the {@link java.util.Collection}, {@link java.util.Map} or array of objects
* used to generate the '<code>input type="checkbox/radio"</code>' tags.
* used to generate the '{@code input type="checkbox/radio"}' tags.
* <p>Typically a runtime expression.
* @param items said items
*/
@@ -86,15 +86,15 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the {@link java.util.Collection}, {@link java.util.Map} or array of objects
* used to generate the '<code>input type="checkbox/radio"</code>' tags.
* used to generate the '{@code input type="checkbox/radio"}' tags.
*/
protected Object getItems() {
return this.items;
}
/**
* Set the name of the property mapped to the '<code>value</code>' attribute
* of the '<code>input type="checkbox/radio"</code>' tag.
* Set the name of the property mapped to the '{@code value}' attribute
* of the '{@code input type="checkbox/radio"}' tag.
* <p>May be a runtime expression.
*/
public void setItemValue(String itemValue) {
@@ -103,8 +103,8 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
}
/**
* Get the name of the property mapped to the '<code>value</code>' attribute
* of the '<code>input type="checkbox/radio"</code>' tag.
* Get the name of the property mapped to the '{@code value}' attribute
* of the '{@code input type="checkbox/radio"}' tag.
*/
protected String getItemValue() {
return this.itemValue;
@@ -112,7 +112,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the value to be displayed as part of the
* '<code>input type="checkbox/radio"</code>' tag.
* '{@code input type="checkbox/radio"}' tag.
* <p>May be a runtime expression.
*/
public void setItemLabel(String itemLabel) {
@@ -122,7 +122,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the value to be displayed as part of the
* '<code>input type="checkbox/radio"</code>' tag.
* '{@code input type="checkbox/radio"}' tag.
*/
protected String getItemLabel() {
return this.itemLabel;
@@ -130,7 +130,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the delimiter to be used between each
* '<code>input type="checkbox/radio"</code>' tag.
* '{@code input type="checkbox/radio"}' tag.
* <p>By default, there is <em>no</em> delimiter.
*/
public void setDelimiter(String delimiter) {
@@ -139,7 +139,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Return the delimiter to be used between each
* '<code>input type="radio"</code>' tag.
* '{@code input type="radio"}' tag.
*/
public String getDelimiter() {
return this.delimiter;
@@ -147,8 +147,8 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the HTML element used to enclose the
* '<code>input type="checkbox/radio"</code>' tag.
* <p>Defaults to an HTML '<code>&lt;span/&gt;</code>' tag.
* '{@code input type="checkbox/radio"}' tag.
* <p>Defaults to an HTML '{@code &lt;span/&gt;}' tag.
*/
public void setElement(String element) {
Assert.hasText(element, "'element' cannot be null or blank");
@@ -157,7 +157,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the HTML element used to enclose
* '<code>input type="checkbox/radio"</code>' tag.
* '{@code input type="checkbox/radio"}' tag.
*/
public String getElement() {
return this.element;
@@ -179,7 +179,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
}
/**
* Renders the '<code>input type="radio"</code>' element with the configured
* Renders the '{@code input type="radio"}' element with the configured
* {@link #setItems(Object)} values. Marks the element as checked if the
* value matches the bound value.
*/

View File

@@ -21,8 +21,8 @@ import javax.servlet.jsp.JspException;
/**
* Abstract base class to provide common methods for implementing
* databinding-aware JSP tags for rendering a <i>single</i>
* HTML '<code>input</code>' element with a '<code>type</code>'
* of '<code>checkbox</code>' or '<code>radio</code>'.
* HTML '{@code input}' element with a '{@code type}'
* of '{@code checkbox}' or '{@code radio}'.
*
* @author Juergen Hoeller
* @since 2.5.2
@@ -30,18 +30,18 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedElementTag {
/**
* The value of the '<code>value</code>' attribute.
* The value of the '{@code value}' attribute.
*/
private Object value;
/**
* The value of the '<code>label</code>' attribute.
* The value of the '{@code label}' attribute.
*/
private Object label;
/**
* Set the value of the '<code>value</code>' attribute.
* Set the value of the '{@code value}' attribute.
* May be a runtime expression.
*/
public void setValue(Object value) {
@@ -49,14 +49,14 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
}
/**
* Get the value of the '<code>value</code>' attribute.
* Get the value of the '{@code value}' attribute.
*/
protected Object getValue() {
return this.value;
}
/**
* Set the value of the '<code>label</code>' attribute.
* Set the value of the '{@code label}' attribute.
* May be a runtime expression.
*/
public void setLabel(Object label) {
@@ -64,7 +64,7 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
}
/**
* Get the value of the '<code>label</code>' attribute.
* Get the value of the '{@code label}' attribute.
*/
protected Object getLabel() {
return this.label;
@@ -72,7 +72,7 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
/**
* Renders the '<code>input(radio)</code>' element with the configured
* Renders the '{@code input(radio)}' element with the configured
* {@link #setValue(Object) value}. Marks the element as checked if the
* value matches the {@link #getValue bound value}.
*/

View File

@@ -31,7 +31,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
public class ButtonTag extends AbstractHtmlElementTag {
/**
* The name of the '<code>disabled</code>' attribute.
* The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
@@ -44,42 +44,42 @@ public class ButtonTag extends AbstractHtmlElementTag {
private String disabled;
/**
* Set the value of the '<code>name</code>' attribute.
* Set the value of the '{@code name}' attribute.
*/
public String getName() {
return name;
}
/**
* Get the value of the '<code>name</code>' attribute.
* Get the value of the '{@code name}' attribute.
*/
public void setName(String name) {
this.name = name;
}
/**
* Get the value of the '<code>value</code>' attribute.
* Get the value of the '{@code value}' attribute.
*/
public String getValue() {
return this.value;
}
/**
* Set the value of the '<code>value</code>' attribute.
* Set the value of the '{@code value}' attribute.
*/
public void setValue(String value) {
this.value = value;
}
/**
* Get the value of the '<code>disabled</code>' attribute.
* Get the value of the '{@code disabled}' attribute.
*/
public String getDisabled() {
return this.disabled;
}
/**
* Set the value of the '<code>disabled</code>' attribute.
* Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -108,7 +108,7 @@ public class ButtonTag extends AbstractHtmlElementTag {
}
/**
* Writes the '<code>value</code>' attribute to the supplied {@link TagWriter}.
* Writes the '{@code value}' attribute to the supplied {@link TagWriter}.
* Subclasses may choose to override this implementation to control exactly
* when the value is written.
*/
@@ -127,16 +127,16 @@ public class ButtonTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>type</code>' attribute. Subclasses
* can override this to change the type of '<code>input</code>' element
* rendered. Default value is '<code>submit</code>'.
* Get the value of the '{@code type}' attribute. Subclasses
* can override this to change the type of '{@code input}' element
* rendered. Default value is '{@code submit}'.
*/
protected String getType() {
return "submit";
}
/**
* Closes the '<code>button</code>' block tag.
* Closes the '{@code button}' block tag.
*/
@Override
public int doEndTag() throws JspException {

View File

@@ -23,22 +23,22 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
* Databinding-aware JSP tag for rendering an HTML '<code>input</code>'
* element with a '<code>type</code>' of '<code>checkbox</code>'.
* Databinding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code checkbox}'.
*
* <p>May be used in one of three different approaches depending on the
* type of the {@link #getValue bound value}.
*
* <h3>Approach One</h3>
* When the bound value is of type {@link Boolean} then the '<code>input(checkbox)</code>'
* is marked as 'checked' if the bound value is <code>true</code>. The '<code>value</code>'
* When the bound value is of type {@link Boolean} then the '{@code input(checkbox)}'
* is marked as 'checked' if the bound value is {@code true}. The '{@code value}'
* attribute corresponds to the resolved value of the {@link #setValue(Object) value} property.
* <h3>Approach Two</h3>
* When the bound value is of type {@link Collection} then the '<code>input(checkbox)</code>'
* When the bound value is of type {@link Collection} then the '{@code input(checkbox)}'
* is marked as 'checked' if the configured {@link #setValue(Object) value} is present in
* the bound {@link Collection}.
* <h3>Approach Three</h3>
* For any other bound value type, the '<code>input(checkbox)</code>' is marked as 'checked'
* For any other bound value type, the '{@code input(checkbox)}' is marked as 'checked'
* if the the configured {@link #setValue(Object) value} is equal to the bound value.
*
* @author Rob Harrop

View File

@@ -21,8 +21,8 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
* Databinding-aware JSP tag for rendering multiple HTML '<code>input</code>'
* elements with a '<code>type</code>' of '<code>checkbox</code>'.
* Databinding-aware JSP tag for rendering multiple HTML '{@code input}'
* elements with a '{@code type}' of '{@code checkbox}'.
*
* <p>Intended to be used with a Collection as the {@link #getItems()} bound value}.
*

View File

@@ -33,9 +33,9 @@ import org.springframework.util.StringUtils;
* <p>This tag supports three main usage patterns:
*
* <ol>
* <li>Field only - set '<code>path</code>' to the field name (or path)</li>
* <li>Object errors only - omit '<code>path</code>'</li>
* <li>All errors - set '<code>path</code>' to '<code>*</code>'</li>
* <li>Field only - set '{@code path}' to the field name (or path)</li>
* <li>Object errors only - omit '{@code path}'</li>
* <li>All errors - set '{@code path}' to '{@code *}'</li>
* </ol>
*
* @author Rob Harrop
@@ -52,7 +52,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
public static final String MESSAGES_ATTRIBUTE = "messages";
/**
* The HTML '<code>span</code>' tag.
* The HTML '{@code span}' tag.
*/
public static final String SPAN_TAG = "span";
@@ -71,7 +71,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Set the HTML element must be used to render the error messages.
* <p>Defaults to an HTML '<code>&lt;span/&gt;</code>' tag.
* <p>Defaults to an HTML '{@code &lt;span/&gt;}' tag.
*/
public void setElement(String element) {
Assert.hasText(element, "'element' cannot be null or blank");
@@ -87,7 +87,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Set the delimiter to be used between error messages.
* <p>Defaults to an HTML '<code>&lt;br/&gt;</code>' tag.
* <p>Defaults to an HTML '{@code &lt;br/&gt;}' tag.
*/
public void setDelimiter(String delimiter) {
this.delimiter = delimiter;
@@ -102,11 +102,11 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Get the value for the HTML '<code>id</code>' attribute.
* <p>Appends '<code>.errors</code>' to the value returned by {@link #getPropertyPath()}
* or to the model attribute name if the <code>&lt;form:errors/&gt;</code> tag's
* '<code>path</code>' attribute has been omitted.
* @return the value for the HTML '<code>id</code>' attribute
* Get the value for the HTML '{@code id}' attribute.
* <p>Appends '{@code .errors}' to the value returned by {@link #getPropertyPath()}
* or to the model attribute name if the {@code &lt;form:errors/&gt;} tag's
* '{@code path}' attribute has been omitted.
* @return the value for the HTML '{@code id}' attribute
* @see #getPropertyPath()
*/
@Override
@@ -120,9 +120,9 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
* Get the value for the HTML '<code>name</code>' attribute.
* <p>Simply returns <code>null</code> because the '<code>name</code>' attribute
* is not a validate attribute for the '<code>span</code>' element.
* Get the value for the HTML '{@code name}' attribute.
* <p>Simply returns {@code null} because the '{@code name}' attribute
* is not a validate attribute for the '{@code span}' element.
*/
@Override
protected String getName() throws JspException {
@@ -132,7 +132,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Should rendering of this tag proceed at all?
* <p>Only renders output when there are errors for the configured {@link #setPath path}.
* @return <code>true</code> only when there are errors for the configured {@link #setPath path}
* @return {@code true} only when there are errors for the configured {@link #setPath path}
*/
@Override
protected boolean shouldRender() throws JspException {
@@ -164,7 +164,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Exposes any bind status error messages under {@link #MESSAGES_ATTRIBUTE this key}
* in the {@link PageContext#PAGE_SCOPE}.
* <p>Only called if {@link #shouldRender()} returns <code>true</code>.
* <p>Only called if {@link #shouldRender()} returns {@code true}.
* @see #removeAttributes()
*/
@Override

View File

@@ -34,7 +34,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
import org.springframework.web.util.HtmlUtils;
/**
* Databinding-aware JSP tag for rendering an HTML '<code>form</code>' whose
* Databinding-aware JSP tag for rendering an HTML '{@code form}' whose
* inner elements are bound to properties on a <em>form object</em>.
*
* <p>Users should place the form object into the
@@ -43,7 +43,7 @@ import org.springframework.web.util.HtmlUtils;
* configured using the {@link #setModelAttribute "modelAttribute"} property.
*
* <p>The default value for the {@link #setModelAttribute "modelAttribute"}
* property is '<code>command</code>' which corresponds to the default name
* property is '{@code command}' which corresponds to the default name
* when using the
* {@link org.springframework.web.servlet.mvc.SimpleFormController SimpleFormController}.
*
@@ -61,7 +61,7 @@ public class FormTag extends AbstractHtmlElementTag {
/** The default attribute name: &quot;command&quot; */
public static final String DEFAULT_COMMAND_NAME = "command";
/** The name of the '<code>modelAttribute</code>' setting */
/** The name of the '{@code modelAttribute}' setting */
private static final String MODEL_ATTRIBUTE = "modelAttribute";
/**
@@ -71,7 +71,7 @@ public class FormTag extends AbstractHtmlElementTag {
public static final String MODEL_ATTRIBUTE_VARIABLE_NAME =
Conventions.getQualifiedAttributeName(AbstractFormTag.class, MODEL_ATTRIBUTE);
/** Default method parameter, i.e. <code>_method</code>. */
/** Default method parameter, i.e. {@code _method}. */
private static final String DEFAULT_METHOD_PARAM = "_method";
private static final String FORM_TAG = "form";
@@ -162,7 +162,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Set the value of the '<code>name</code>' attribute.
* Set the value of the '{@code name}' attribute.
* <p>May be a runtime expression.
* <p>Name is not a valid attribute for form on XHTML 1.0. However,
* it is sometimes needed for backward compatibility.
@@ -172,7 +172,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>name</code>' attribute.
* Get the value of the '{@code name}' attribute.
*/
@Override
protected String getName() throws JspException {
@@ -180,7 +180,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Set the value of the '<code>action</code>' attribute.
* Set the value of the '{@code action}' attribute.
* <p>May be a runtime expression.
*/
public void setAction(String action) {
@@ -188,14 +188,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>action</code>' attribute.
* Get the value of the '{@code action}' attribute.
*/
protected String getAction() {
return this.action;
}
/**
* Set the value of the '<code>method</code>' attribute.
* Set the value of the '{@code method}' attribute.
* <p>May be a runtime expression.
*/
public void setMethod(String method) {
@@ -203,14 +203,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>method</code>' attribute.
* Get the value of the '{@code method}' attribute.
*/
protected String getMethod() {
return this.method;
}
/**
* Set the value of the '<code>target</code>' attribute.
* Set the value of the '{@code target}' attribute.
* <p>May be a runtime expression.
*/
public void setTarget(String target) {
@@ -218,14 +218,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>target</code>' attribute.
* Get the value of the '{@code target}' attribute.
*/
public String getTarget() {
return this.target;
}
/**
* Set the value of the '<code>enctype</code>' attribute.
* Set the value of the '{@code enctype}' attribute.
* <p>May be a runtime expression.
*/
public void setEnctype(String enctype) {
@@ -233,14 +233,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>enctype</code>' attribute.
* Get the value of the '{@code enctype}' attribute.
*/
protected String getEnctype() {
return this.enctype;
}
/**
* Set the value of the '<code>acceptCharset</code>' attribute.
* Set the value of the '{@code acceptCharset}' attribute.
* <p>May be a runtime expression.
*/
public void setAcceptCharset(String acceptCharset) {
@@ -248,14 +248,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>acceptCharset</code>' attribute.
* Get the value of the '{@code acceptCharset}' attribute.
*/
protected String getAcceptCharset() {
return this.acceptCharset;
}
/**
* Set the value of the '<code>onsubmit</code>' attribute.
* Set the value of the '{@code onsubmit}' attribute.
* <p>May be a runtime expression.
*/
public void setOnsubmit(String onsubmit) {
@@ -263,14 +263,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>onsubmit</code>' attribute.
* Get the value of the '{@code onsubmit}' attribute.
*/
protected String getOnsubmit() {
return this.onsubmit;
}
/**
* Set the value of the '<code>onreset</code>' attribute.
* Set the value of the '{@code onreset}' attribute.
* <p>May be a runtime expression.
*/
public void setOnreset(String onreset) {
@@ -278,14 +278,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>onreset</code>' attribute.
* Get the value of the '{@code onreset}' attribute.
*/
protected String getOnreset() {
return this.onreset;
}
/**
* Set the value of the '<code>autocomplete</code>' attribute.
* Set the value of the '{@code autocomplete}' attribute.
* May be a runtime expression.
*/
public void setAutocomplete(String autocomplete) {
@@ -293,7 +293,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>autocomplete</code>' attribute.
* Get the value of the '{@code autocomplete}' attribute.
*/
protected String getAutocomplete() {
return this.autocomplete;
@@ -321,7 +321,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Writes the opening part of the block '<code>form</code>' tag and exposes
* Writes the opening part of the block '{@code form}' tag and exposes
* the form object name in the {@link javax.servlet.jsp.PageContext}.
* @param tagWriter the {@link TagWriter} to which the form content is to be written
* @return {@link javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE}
@@ -389,7 +389,7 @@ public class FormTag extends AbstractHtmlElementTag {
/**
* {@link #evaluate Resolves} and returns the name of the form object.
* @throws IllegalArgumentException if the form object resolves to <code>null</code>
* @throws IllegalArgumentException if the form object resolves to {@code null}
*/
protected String resolveModelAttribute() throws JspException {
Object resolvedModelAttribute = evaluate(MODEL_ATTRIBUTE, getModelAttribute());
@@ -400,12 +400,12 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Resolve the value of the '<code>action</code>' attribute.
* <p>If the user configured an '<code>action</code>' value then
* Resolve the value of the '{@code action}' attribute.
* <p>If the user configured an '{@code action}' value then
* the result of evaluating this value is used. Otherwise, the
* {@link org.springframework.web.servlet.support.RequestContext#getRequestUri() originating URI}
* is used.
* @return the value that is to be used for the '<code>action</code>' attribute
* @return the value that is to be used for the '{@code action}' attribute
*/
protected String resolveAction() throws JspException {
String action = getAction();
@@ -447,7 +447,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Closes the '<code>form</code>' block tag and removes the form object name
* Closes the '{@code form}' block tag and removes the form object name
* from the {@link javax.servlet.jsp.PageContext}.
*/
@Override

View File

@@ -19,7 +19,7 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Data-binding aware JSP tag for rendering a hidden HTML '<code>input</code>' field
* Data-binding aware JSP tag for rendering a hidden HTML '{@code input}' field
* containing the databound value.
*
* <p>Example (binding to 'name' property of form backing object):
@@ -36,21 +36,21 @@ import javax.servlet.jsp.JspException;
public class HiddenInputTag extends AbstractHtmlElementTag {
/**
* The name of the '<code>disabled</code>' attribute.
* The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
private String disabled;
/**
* Get the value of the '<code>disabled</code>' attribute.
* Get the value of the '{@code disabled}' attribute.
*/
public String getDisabled() {
return this.disabled;
}
/**
* Set the value of the '<code>disabled</code>' attribute.
* Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -66,7 +66,7 @@ public class HiddenInputTag extends AbstractHtmlElementTag {
}
/**
* Writes the HTML '<code>input</code>' tag to the supplied {@link TagWriter} including the
* Writes the HTML '{@code input}' tag to the supplied {@link TagWriter} including the
* databound value.
* @see #writeDefaultAttributes(TagWriter)
* @see #getBoundValue()

View File

@@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Data-binding-aware JSP tag for rendering an HTML '<code>input</code>'
* element with a '<code>type</code>' of '<code>text</code>'.
* Data-binding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code text}'.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -55,7 +55,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
/**
* Set the value of the '<code>size</code>' attribute.
* Set the value of the '{@code size}' attribute.
* May be a runtime expression.
*/
public void setSize(String size) {
@@ -63,14 +63,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>size</code>' attribute.
* Get the value of the '{@code size}' attribute.
*/
protected String getSize() {
return this.size;
}
/**
* Set the value of the '<code>maxlength</code>' attribute.
* Set the value of the '{@code maxlength}' attribute.
* May be a runtime expression.
*/
public void setMaxlength(String maxlength) {
@@ -78,14 +78,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>maxlength</code>' attribute.
* Get the value of the '{@code maxlength}' attribute.
*/
protected String getMaxlength() {
return this.maxlength;
}
/**
* Set the value of the '<code>alt</code>' attribute.
* Set the value of the '{@code alt}' attribute.
* May be a runtime expression.
*/
public void setAlt(String alt) {
@@ -93,14 +93,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>alt</code>' attribute.
* Get the value of the '{@code alt}' attribute.
*/
protected String getAlt() {
return this.alt;
}
/**
* Set the value of the '<code>onselect</code>' attribute.
* Set the value of the '{@code onselect}' attribute.
* May be a runtime expression.
*/
public void setOnselect(String onselect) {
@@ -108,14 +108,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>onselect</code>' attribute.
* Get the value of the '{@code onselect}' attribute.
*/
protected String getOnselect() {
return this.onselect;
}
/**
* Set the value of the '<code>autocomplete</code>' attribute.
* Set the value of the '{@code autocomplete}' attribute.
* May be a runtime expression.
*/
public void setAutocomplete(String autocomplete) {
@@ -123,7 +123,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>autocomplete</code>' attribute.
* Get the value of the '{@code autocomplete}' attribute.
*/
protected String getAutocomplete() {
return this.autocomplete;
@@ -131,9 +131,9 @@ public class InputTag extends AbstractHtmlInputElementTag {
/**
* Writes the '<code>input</code>' tag to the supplied {@link TagWriter}.
* Writes the '{@code input}' tag to the supplied {@link TagWriter}.
* Uses the value returned by {@link #getType()} to determine which
* type of '<code>input</code>' element to render.
* type of '{@code input}' element to render.
*/
@Override
protected int writeTagContent(TagWriter tagWriter) throws JspException {
@@ -161,7 +161,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Writes the '<code>value</code>' attribute to the supplied {@link TagWriter}.
* Writes the '{@code value}' attribute to the supplied {@link TagWriter}.
* Subclasses may choose to override this implementation to control exactly
* when the value is written.
*/
@@ -186,9 +186,9 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
* Get the value of the '<code>type</code>' attribute. Subclasses
* can override this to change the type of '<code>input</code>' element
* rendered. Default value is '<code>text</code>'.
* Get the value of the '{@code type}' attribute. Subclasses
* can override this to change the type of '{@code input}' element
* rendered. Default value is '{@code text}'.
*/
protected String getType() {
return "text";

View File

@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* Databinding-aware JSP tag for rendering an HTML '<code>label</code>' element
* Databinding-aware JSP tag for rendering an HTML '{@code label}' element
* that defines text that is associated with a single form element.
*
* <p>The {@link #setFor(String) 'for'} attribute is required.
@@ -37,12 +37,12 @@ import org.springframework.util.StringUtils;
public class LabelTag extends AbstractHtmlElementTag {
/**
* The HTML '<code>label</code>' tag.
* The HTML '{@code label}' tag.
*/
private static final String LABEL_TAG = "label";
/**
* The name of the '<code>for</code>' attribute.
* The name of the '{@code for}' attribute.
*/
private static final String FOR_ATTRIBUTE = "for";
@@ -54,15 +54,15 @@ public class LabelTag extends AbstractHtmlElementTag {
private TagWriter tagWriter;
/**
* The value of the '<code>for</code>' attribute.
* The value of the '{@code for}' attribute.
*/
private String forId;
/**
* Set the value of the '<code>for</code>' attribute.
* Set the value of the '{@code for}' attribute.
* <p>Defaults to the value of {@link #getPath}; may be a runtime expression.
* @throws IllegalArgumentException if the supplied value is <code>null</code>
* @throws IllegalArgumentException if the supplied value is {@code null}
*/
public void setFor(String forId) {
Assert.notNull(forId, "'forId' must not be null");
@@ -70,7 +70,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
* Get the value of the '<code>id</code>' attribute.
* Get the value of the '{@code id}' attribute.
* <p>May be a runtime expression.
*/
public String getFor() {
@@ -79,7 +79,7 @@ public class LabelTag extends AbstractHtmlElementTag {
/**
* Writes the opening '<code>label</code>' tag and forces a block tag so
* Writes the opening '{@code label}' tag and forces a block tag so
* that body content is written correctly.
* @return {@link javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE}
*/
@@ -94,10 +94,10 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
* Overrides {@link #getName()} to always return <code>null</code>,
* because the '<code>name</code>' attribute is not supported by the
* '<code>label</code>' tag.
* @return the value for the HTML '<code>name</code>' attribute
* Overrides {@link #getName()} to always return {@code null},
* because the '{@code name}' attribute is not supported by the
* '{@code label}' tag.
* @return the value for the HTML '{@code name}' attribute
*/
@Override
protected String getName() throws JspException {
@@ -106,7 +106,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
* Determine the '<code>for</code>' attribute value for this tag,
* Determine the '{@code for}' attribute value for this tag,
* autogenerating one if none specified.
* @see #getFor()
* @see #autogenerateFor()
@@ -121,7 +121,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
* Autogenerate the '<code>for</code>' attribute value for this tag.
* Autogenerate the '{@code for}' attribute value for this tag.
* <p>The default implementation delegates to {@link #getPropertyPath()},
* deleting invalid characters (such as "[" or "]").
*/
@@ -130,7 +130,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
* Close the '<code>label</code>' tag.
* Close the '{@code label}' tag.
*/
@Override
public int doEndTag() throws JspException {

View File

@@ -25,20 +25,20 @@ import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.util.TagUtils;
/**
* JSP tag for rendering an HTML '<code>option</code>' tag.
* JSP tag for rendering an HTML '{@code option}' tag.
*
* <p><b>Must be used nested inside a {@link SelectTag}.</b>
*
* <p>Provides full support for databinding by marking an
* '<code>option</code>' as 'selected' if the {@link #setValue value}
* '{@code option}' as 'selected' if the {@link #setValue value}
* matches the value bound to the out {@link SelectTag}.
*
* <p>The {@link #setValue value} property is required and corresponds to
* the '<code>value</code>' attribute of the rendered '<code>option</code>'.
* the '{@code value}' attribute of the rendered '{@code option}'.
*
* <p>An optional {@link #setLabel label} property can be specified, the
* value of which corresponds to inner text of the rendered
* '<code>option</code>' tag. If no {@link #setLabel label} is specified
* '{@code option}' tag. If no {@link #setLabel label} is specified
* then the {@link #setValue value} property will be used when rendering
* the inner text.
*
@@ -59,28 +59,28 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
public static final String DISPLAY_VALUE_VARIABLE_NAME = "displayValue";
/**
* The name of the '<code>selected</code>' attribute.
* The name of the '{@code selected}' attribute.
*/
private static final String SELECTED_ATTRIBUTE = "selected";
/**
* The name of the '<code>value</code>' attribute.
* The name of the '{@code value}' attribute.
*/
private static final String VALUE_ATTRIBUTE = VALUE_VARIABLE_NAME;
/**
* The name of the '<code>disabled</code>' attribute.
* The name of the '{@code disabled}' attribute.
*/
private static final String DISABLED_ATTRIBUTE = "disabled";
/**
* The 'value' attribute of the rendered HTML <code>&lt;option&gt;</code> tag.
* The 'value' attribute of the rendered HTML {@code &lt;option&gt;} tag.
*/
private Object value;
/**
* The text body of the rendered HTML <code>&lt;option&gt;</code> tag.
* The text body of the rendered HTML {@code &lt;option&gt;} tag.
*/
private String label;
@@ -92,7 +92,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Set the 'value' attribute of the rendered HTML <code>&lt;option&gt;</code> tag.
* Set the 'value' attribute of the rendered HTML {@code &lt;option&gt;} tag.
* <p>May be a runtime expression.
*/
public void setValue(Object value) {
@@ -100,23 +100,23 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
* Get the 'value' attribute of the rendered HTML <code>&lt;option&gt;</code> tag.
* Get the 'value' attribute of the rendered HTML {@code &lt;option&gt;} tag.
*/
protected Object getValue() {
return this.value;
}
/**
* Set the value of the '<code>disabled</code>' attribute.
* Set the value of the '{@code disabled}' attribute.
* <p>May be a runtime expression.
* @param disabled the value of the '<code>disabled</code>' attribute
* @param disabled the value of the '{@code disabled}' attribute
*/
public void setDisabled(String disabled) {
this.disabled = disabled;
}
/**
* Get the value of the '<code>disabled</code>' attribute.
* Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
@@ -124,14 +124,14 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Is the current HTML tag disabled?
* @return <code>true</code> if this tag is disabled
* @return {@code true} if this tag is disabled
*/
protected boolean isDisabled() throws JspException {
return evaluateBoolean(DISABLED_ATTRIBUTE, getDisabled());
}
/**
* Set the text body of the rendered HTML <code>&lt;option&gt;</code> tag.
* Set the text body of the rendered HTML {@code &lt;option&gt;} tag.
* <p>May be a runtime expression.
*/
public void setLabel(String label) {
@@ -140,7 +140,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
* Get the text body of the rendered HTML <code>&lt;option&gt;</code> tag.
* Get the text body of the rendered HTML {@code &lt;option&gt;} tag.
*/
protected String getLabel() {
return this.label;
@@ -162,7 +162,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
* Make sure we are under a '<code>select</code>' tag before proceeding.
* Make sure we are under a '{@code select}' tag before proceeding.
*/
@Override
protected void onWriteTagContent() {
@@ -225,9 +225,9 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
* Returns the value of the label for this '<code>option</code>' element.
* Returns the value of the label for this '{@code option}' element.
* If the {@link #setLabel label} property is set then the resolved value
* of that property is used, otherwise the value of the <code>resolvedValue</code>
* of that property is used, otherwise the value of the {@code resolvedValue}
* argument is used.
*/
private String getLabelValue(Object resolvedValue) throws JspException {

View File

@@ -34,25 +34,25 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
import org.springframework.web.servlet.support.RequestContext;
/**
* Provides supporting functionality to render a list of '<code>option</code>'
* Provides supporting functionality to render a list of '{@code option}'
* tags based on some source object. This object can be either an array, a
* {@link Collection}, or a {@link Map}.
* <h3>Using an array or a {@link Collection}:</h3>
* <p>
* If you supply an array or {@link Collection} source object to render the
* inner '<code>option</code>' tags, you may optionally specify the name of
* inner '{@code option}' tags, you may optionally specify the name of
* the property on the objects which corresponds to the <em>value</em> of the
* rendered '<code>option</code>' (i.e., the <code>valueProperty</code>)
* rendered '{@code option}' (i.e., the {@code valueProperty})
* and the name of the property that corresponds to the <em>label</em> (i.e.,
* the <code>labelProperty</code>). These properties are then used when
* rendering each element of the array/{@link Collection} as an '<code>option</code>'.
* the {@code labelProperty}). These properties are then used when
* rendering each element of the array/{@link Collection} as an '{@code option}'.
* If either property name is omitted, the value of {@link Object#toString()} of
* the corresponding array/{@link Collection} element is used instead. However,
* if the item is an enum, {@link Enum#name()} is used as the default value.
* </p>
* <h3>Using a {@link Map}:</h3>
* <p>
* You can alternatively choose to render '<code>option</code>' tags by
* You can alternatively choose to render '{@code option}' tags by
* supplying a {@link Map} as the source object.
* </p>
* <p>
@@ -60,29 +60,29 @@ import org.springframework.web.servlet.support.RequestContext;
* <em>label</em>:
* </p>
* <ul>
* <li>the <code>key</code> of each {@link Map} entry will correspond to the
* <em>value</em> of the rendered '<code>option</code>', and</li>
* <li>the <code>value</code> of each {@link Map} entry will correspond to
* the <em>label</em> of the rendered '<code>option</code>'.</li>
* <li>the {@code key} of each {@link Map} entry will correspond to the
* <em>value</em> of the rendered '{@code option}', and</li>
* <li>the {@code value} of each {@link Map} entry will correspond to
* the <em>label</em> of the rendered '{@code option}'.</li>
* </ul>
* <p>
* If you <strong>supply</strong> property names for the <em>value</em> and
* <em>label</em>:
* </p>
* <ul>
* <li>the <em>value</em> of the rendered '<code>option</code>' will be
* retrieved from the <code>valueProperty</code> on the object
* corresponding to the <code>key</code> of each {@link Map} entry, and</li>
* <li>the <em>label</em> of the rendered '<code>option</code>' will be
* retrieved from the <code>labelProperty</code> on the object
* corresponding to the <code>value</code> of each {@link Map} entry.
* <li>the <em>value</em> of the rendered '{@code option}' will be
* retrieved from the {@code valueProperty} on the object
* corresponding to the {@code key} of each {@link Map} entry, and</li>
* <li>the <em>label</em> of the rendered '{@code option}' will be
* retrieved from the {@code labelProperty} on the object
* corresponding to the {@code value} of each {@link Map} entry.
* </ul>
* <h3>When using either of these approaches:</h3>
* <ul>
* <li>Property names for the <em>value</em> and <em>label</em> are
* specified as arguments to the
* {@link #OptionWriter(Object, BindStatus, String, String, boolean) constructor}.</li>
* <li>An '<code>option</code>' is marked as 'selected' if its key
* <li>An '{@code option}' is marked as 'selected' if its key
* {@link #isOptionSelected matches} the value that is bound to the tag instance.</li>
* </ul>
*
@@ -106,12 +106,12 @@ class OptionWriter {
/**
* Creates a new <code>OptionWriter</code> for the supplied <code>objectSource</code>.
* @param optionSource the source of the <code>options</code> (never <code>null</code>)
* @param bindStatus the {@link BindStatus} for the bound value (never <code>null</code>)
* @param valueProperty the name of the property used to render <code>option</code> values
* Creates a new {@code OptionWriter} for the supplied {@code objectSource}.
* @param optionSource the source of the {@code options} (never {@code null})
* @param bindStatus the {@link BindStatus} for the bound value (never {@code null})
* @param valueProperty the name of the property used to render {@code option} values
* (optional)
* @param labelProperty the name of the property used to render <code>option</code> labels
* @param labelProperty the name of the property used to render {@code option} labels
* (optional)
*/
public OptionWriter(
@@ -128,7 +128,7 @@ class OptionWriter {
/**
* Write the '<code>option</code>' tags for the configured {@link #optionSource} to
* Write the '{@code option}' tags for the configured {@link #optionSource} to
* the supplied {@link TagWriter}.
*/
public void writeOptions(TagWriter tagWriter) throws JspException {
@@ -151,7 +151,7 @@ class OptionWriter {
}
/**
* Renders the inner '<code>option</code>' tags using the {@link #optionSource}.
* Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromArray(TagWriter tagWriter) throws JspException {
@@ -159,7 +159,7 @@ class OptionWriter {
}
/**
* Renders the inner '<code>option</code>' tags using the supplied
* Renders the inner '{@code option}' tags using the supplied
* {@link Map} as the source.
* @see #renderOption(TagWriter, Object, Object, Object)
*/
@@ -179,7 +179,7 @@ class OptionWriter {
}
/**
* Renders the inner '<code>option</code>' tags using the {@link #optionSource}.
* Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromCollection(TagWriter tagWriter) throws JspException {
@@ -187,7 +187,7 @@ class OptionWriter {
}
/**
* Renders the inner '<code>option</code>' tags using the {@link #optionSource}.
* Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromEnum(TagWriter tagWriter) throws JspException {
@@ -195,9 +195,9 @@ class OptionWriter {
}
/**
* Renders the inner '<code>option</code>' tags using the supplied {@link Collection} of
* Renders the inner '{@code option}' tags using the supplied {@link Collection} of
* objects as the source. The value of the {@link #valueProperty} field is used
* when rendering the '<code>value</code>' of the '<code>option</code>' and the value of the
* when rendering the '{@code value}' of the '{@code option}' and the value of the
* {@link #labelProperty} property is used when rendering the label.
*/
private void doRenderFromCollection(Collection optionCollection, TagWriter tagWriter) throws JspException {
@@ -219,7 +219,7 @@ class OptionWriter {
}
/**
* Renders an HTML '<code>option</code>' with the supplied value and label. Marks the
* Renders an HTML '{@code option}' with the supplied value and label. Marks the
* value as 'selected' if either the item itself or its value match the bound value.
*/
private void renderOption(TagWriter tagWriter, Object item, Object value, Object label) throws JspException {
@@ -245,7 +245,7 @@ class OptionWriter {
}
/**
* Determines the display value of the supplied <code>Object</code>,
* Determines the display value of the supplied {@code Object},
* HTML-escaped as required.
*/
private String getDisplayString(Object value) {

View File

@@ -27,8 +27,8 @@ import org.springframework.web.util.TagUtils;
/**
* Convenient tag that allows one to supply a collection of objects
* that are to be rendered as '<code>option</code>' tags within a
* '<code>select</code>' tag.
* that are to be rendered as '{@code option}' tags within a
* '{@code select}' tag.
*
* <p><i>Must</i> be used within a {@link SelectTag 'select' tag}.
*
@@ -41,19 +41,19 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* The {@link java.util.Collection}, {@link java.util.Map} or array of
* objects used to generate the inner '<code>option</code>' tags.
* objects used to generate the inner '{@code option}' tags.
*/
private Object items;
/**
* The name of the property mapped to the '<code>value</code>' attribute
* of the '<code>option</code>' tag.
* The name of the property mapped to the '{@code value}' attribute
* of the '{@code option}' tag.
*/
private String itemValue;
/**
* The name of the property mapped to the inner text of the
* '<code>option</code>' tag.
* '{@code option}' tag.
*/
private String itemLabel;
@@ -62,8 +62,8 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Set the {@link java.util.Collection}, {@link java.util.Map} or array
* of objects used to generate the inner '<code>option</code>' tags.
* <p>Required when wishing to render '<code>option</code>' tags from an
* of objects used to generate the inner '{@code option}' tags.
* <p>Required when wishing to render '{@code option}' tags from an
* array, {@link java.util.Collection} or {@link java.util.Map}.
* <p>Typically a runtime expression.
*/
@@ -73,7 +73,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Get the {@link java.util.Collection}, {@link java.util.Map} or array
* of objects used to generate the inner '<code>option</code>' tags.
* of objects used to generate the inner '{@code option}' tags.
* <p>Typically a runtime expression.
*/
protected Object getItems() {
@@ -81,9 +81,9 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
* Set the name of the property mapped to the '<code>value</code>'
* attribute of the '<code>option</code>' tag.
* <p>Required when wishing to render '<code>option</code>' tags from
* Set the name of the property mapped to the '{@code value}'
* attribute of the '{@code option}' tag.
* <p>Required when wishing to render '{@code option}' tags from
* an array or {@link java.util.Collection}.
* <p>May be a runtime expression.
*/
@@ -93,8 +93,8 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
* Return the name of the property mapped to the '<code>value</code>'
* attribute of the '<code>option</code>' tag.
* Return the name of the property mapped to the '{@code value}'
* attribute of the '{@code option}' tag.
*/
protected String getItemValue() {
return this.itemValue;
@@ -102,7 +102,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Set the name of the property mapped to the label (inner text) of the
* '<code>option</code>' tag.
* '{@code option}' tag.
* <p>May be a runtime expression.
*/
public void setItemLabel(String itemLabel) {
@@ -112,7 +112,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Get the name of the property mapped to the label (inner text) of the
* '<code>option</code>' tag.
* '{@code option}' tag.
* <p>May be a runtime expression.
*/
protected String getItemLabel() {
@@ -120,16 +120,16 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
* Set the value of the '<code>disabled</code>' attribute.
* Set the value of the '{@code disabled}' attribute.
* <p>May be a runtime expression.
* @param disabled the value of the '<code>disabled</code>' attribute
* @param disabled the value of the '{@code disabled}' attribute
*/
public void setDisabled(String disabled) {
this.disabled = disabled;
}
/**
* Get the value of the '<code>disabled</code>' attribute.
* Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
@@ -137,7 +137,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Is the current HTML tag disabled?
* @return <code>true</code> if this tag is disabled
* @return {@code true} if this tag is disabled
*/
protected boolean isDisabled() throws JspException {
return evaluateBoolean("disabled", getDisabled());

View File

@@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Databinding-aware JSP tag for rendering an HTML '<code>input</code>'
* element with a '<code>type</code>' of '<code>password</code>'.
* Databinding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code password}'.
*
* @author Rob Harrop
* @author Rick Evans
@@ -34,7 +34,7 @@ public class PasswordInputTag extends InputTag {
/**
* Is the password value to be rendered?
* @return <code>true</code> if the password value to be rendered.
* @return {@code true} if the password value to be rendered.
*/
public boolean isShowPassword() {
return this.showPassword;
@@ -42,7 +42,7 @@ public class PasswordInputTag extends InputTag {
/**
* Is the password value to be rendered?
* @param showPassword <code>true</code> if the password value is to be rendered.
* @param showPassword {@code true} if the password value is to be rendered.
*/
public void setShowPassword(boolean showPassword) {
this.showPassword = showPassword;
@@ -57,8 +57,8 @@ public class PasswordInputTag extends InputTag {
}
/**
* Return '<code>password</code>' causing the rendered HTML '<code>input</code>'
* element to have a '<code>type</code>' of '<code>password</code>'.
* Return '{@code password}' causing the rendered HTML '{@code input}'
* element to have a '{@code type}' of '{@code password}'.
*/
@Override
protected String getType() {

Some files were not shown because too many files have changed in this diff Show More