|
From: Cameron B. <ca...@da...> - 2004-02-20 06:37:18
|
I don't use spring mvc, so this idea may already be implemented. The pattern goes something like this : Have a SpringBeanDelegatingServlet and a SpringBeanDelegatingFilter class that implement HttpServlet and Filter respectively. These classes use init-params to define a named bean to delegate to within spring. Their process methods (process(request,response) or filter(request,response,chain)) delegate to this bean within spring. This allows the beans witin spring to implement HttpServlet or Filter, and to be configured using normal bean configuration like any other bean. I presume that something like this is already integrated into the MVC portion of spring, but I would like to have these two standalone classes to be able to write my own servlets that don't use any other parts of the mcv system. Thanks, Cameron. |