Announcement Announcement Module
Collapse
No announcement yet.
HandlerInterceptor equivalent in Webflow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HandlerInterceptor equivalent in Webflow

    Hi guys,

    please help a total webflow/jsf noob out!

    I'm looking for a way to get the same functionality as with a HandlerInterceptor in Spring MVC.
    That is, I want to do some checks before the flow starts, possibly redirecting to an error site,
    store something in a session scoped bean and write to a logging table after the request.

    In our MVC application, I used a HandlerInterceptor to filter out invalid characters and do some logging
    after the controller ended.

    My HandlerInterceptor doesn't get called by JSF/Webflow.
    I tried a OncePerRequestFilter, but it didn't get my beans wired into it.

    So, how can I do this in webflow?

    Thanks a lot!

  • #2
    If it doesn't get called you have a problem in your configuration. You can easily (re)use HandlerInterceptors for web flow. There is a catch however as spring web flow has it's own view handling/resolving mechanism changes to the modelandview (which probably is going to be null) don't work as the rendering etc. is already done in the postHandle method.

    If you want a filter use a DelegatingFilterProxy that allows you to configure the filter in an application context.

    Comment


    • #3
      Thank you very much, Marten!

      Originally posted by Marten Deinum View Post
      If it doesn't get called you have a problem in your configuration. You can easily (re)use HandlerInterceptors for web flow.
      Great! I didn't find this information anywhere. I will look over my config again.


      Originally posted by Marten Deinum View Post
      There is a catch however as spring web flow has it's own view handling/resolving mechanism changes to the modelandview (which probably is going to be null) don't work as the rendering etc. is already done in the postHandle method.
      This will be no problem as I don't need to modify the model, I just need access to a DAO and a request scoped bean at that point.

      Originally posted by Marten Deinum View Post
      If you want a filter use a DelegatingFilterProxy that allows you to configure the filter in an application context.
      Thank you, I will look into that!

      Comment

      Working...
      X