|
|
Front Controller or Interceptors?
Hi all!
I'm very new to spring. I need to write a process where at the beginning, bunch information is collected and process, then base on the processed info, we'll send the info to a webflow. I'm having a little trouble here figuring out what kind of mechanism i should use for the initial process.
Right now i'm thinking to have a master-flow and make the starting starting stage to do the init process then relay the info to any other subflows.
Some one also told me to use Interceptors. I kind of understand the AOP concept for interceptors but not enough to know if this is a good idea for what i'm doing.
Can anybody give me some advice?
THanx!
Kevin
Filter --gt; Interceptor --gt; AOP
That is my description of the development of those three technologies. For your case, you will solve your problem if you understand a Servlet filter.
HTH
How do you collect the quot;bunch informationquot; at the beginning? From a database based on user identity or directly from the user based on forms?
The former is well suited for filters or interceptors, the latter should be dealt with inside a controller in my opinion.
The init process pretty much is just taking all the user variables such as ip, locale time...ect, mostly server variables and base on those we store it in database and find a correct webflow path for the user.
It does seems like using filters to do all the work before the controllers kicks in is the proper way to go. |
|