java.lang.Object | ||||||
↳ | org.springframework.context.support.ApplicationObjectSupport | |||||
↳ | org.springframework.web.context.support.WebApplicationObjectSupport | |||||
↳ | org.springframework.web.servlet.support.WebContentGenerator | |||||
↳ | org.springframework.web.servlet.mvc.AbstractController | |||||
↳ | org.springframework.web.servlet.mvc.BaseCommandController | |||||
↳ | org.springframework.web.servlet.mvc.AbstractCommandController |
This class is deprecated.
as of Spring 3.0, in favor of annotated controllers
Abstract base class for custom command controllers.
Autopopulates a command bean from the request. For command validation,
a validator (property inherited from BaseCommandController
) can be
used.
In most cases this command controller should not be used to handle form
submission, because functionality for forms is offered in more detail by the
AbstractFormController
and its
corresponding implementations.
Exposed configuration properties
(and those defined by superclass):
none (so only those available in superclass).
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.mvc.BaseCommandController
| |||||||||||
From class
org.springframework.web.servlet.support.WebContentGenerator
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.ApplicationObjectSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new AbstractCommandController.
| |||||||||||
Create a new AbstractCommandController.
| |||||||||||
Create a new AbstractCommandController.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Template method for request handling, providing a populated and validated instance
of the command class, and an Errors object containing binding and validation errors.
| |||||||||||
Template method.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.mvc.BaseCommandController
| |||||||||||
From class
org.springframework.web.servlet.mvc.AbstractController
| |||||||||||
From class
org.springframework.web.servlet.support.WebContentGenerator
| |||||||||||
From class
org.springframework.web.context.support.WebApplicationObjectSupport
| |||||||||||
From class
org.springframework.context.support.ApplicationObjectSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
From interface
org.springframework.web.context.ServletContextAware
| |||||||||||
From interface
org.springframework.web.servlet.mvc.Controller
|
Create a new AbstractCommandController.
Create a new AbstractCommandController.
commandClass | class of the command bean |
---|
Create a new AbstractCommandController.
commandClass | class of the command bean |
---|---|
commandName | name of the command bean |
Template method for request handling, providing a populated and validated instance of the command class, and an Errors object containing binding and validation errors.
Call 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.
request | current HTTP request |
---|---|
response | current HTTP response |
command | the populated command object |
errors | validation errors holder |
null
if handled directlyException |
---|
Template method. Subclasses must implement this.
The contract is the same as for handleRequest
.
Exception |
---|