• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

spring mvc: defining controller through @controller

 
Greenhorn
Posts: 7
MyEclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can somebody help on understanding, that whether by declaring own constructor through DefaultAnnotationHandlerMapping uses some implementation of Controller interface or not. if not then how does model data is nd put in the HttpSession automatically?

Regards,
Manuj
 
Saloon Keeper
Posts: 26538
187
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this question to the Spring forum.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On newer versions of Spring the RequestMappingHandlerMapping is used not the one you mentioned. The @Controller annotation is just a marker interface used to allow the class to be found and registered by the RequestMappingHandlerMapping, its an empty interface there is no implementation. The second part of your question has nothing to do with the first part. When the DiispatcherServlet is near through handling the request one of the last steps is for the resolved view to render the response. At this point the view that was resolved will expose the model as request attributes not put them on the session. The exception here is if you used the @SessionAttributes annotation on your controller.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The @ controller interface make simple java class act as controller .The @requestmaping specify the url to which this controller is run and all the data in request bind to this class .To bind data in to response use model object
 
reply
    Bookmark Topic Watch Topic
  • New Topic