Loading
Spring Command controllers Exmaple

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Spring Command controllers Overview


Ans)

There are several types of Command controllers exist in Spring MVC including
"AbstractCommandController","SimpleFormController","AbstractWizardFormController"
each of these Controller offers different type of implementation capabilties.

Among these most commonly used one is "SimpleFormController", following code
 illustrates how to use this Controller.

This Controller offering form submission. The Controller class lets you specify
 a command object, a viewname for the form, a viewname for page you want to show
 the user when form submission has succeeded, and more.

Most important methods you should override when you use this Controller class are
 i) formBackingObject(HttpServletRequest httpServletRequest) :
  A method which you can use to set the New Form to your View.
 
 ii) Map referenceData():
     A method which you can use to pass model data to your view in the form of a Map;
 
 iii)
   onSubmit(HttpServletRequest httpServletRequest, HttpServletResponse
     httpServletResponse, Object o, BindException e) 
 
commandClass :
"commandClass" could be used to set your Form as following .
  <property name="commandClass" value="com.salesorder.StartForm"/>
 
commandName :
"commandName" with which you can  



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Spring Command controllers Exmaple


Spring Command controllers Exmaple

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free