-
Jun 4th, 2008, 12:57 PM
#1
how to add custom object/bean to a controller method
I have a multiaction controller which has custom methods doSomething(request,response,bean) .... so if i want to have a bean passed as the third parameter which is not a value object, how do i do tht?
i had already overriden few methods in multi action controller ... but i need to get hold of request object to create this bean.
So do handler interceptors provide any of this? or should i use aop for this?
-
Jun 4th, 2008, 01:52 PM
#2
You cannot, the method syntax of the MultiActionControllers are quite limited. You might want to take a look at the new @Controller stuff...
-
Jun 4th, 2008, 02:39 PM
#3
Hello Marten,
Thanks for the response.
but i have read in spring best practices that annotation based wiring should be avoided.as it might cause confusion. Is this true?
What would you prefer to use MultiActionController or Annotation based controllers.
Many thanks
Srikanth N
-
Jun 4th, 2008, 03:27 PM
#4
I wasn't talking about annotation based wiring! I was talking about annotated controllers (@Controller) which is something completly different. You don't have to use annotations to wire those @controllers although you can.
@Controller is more powerfull than MAC, so I would prefer that one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules