• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Intercepting Filters in Component diagram

 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
There are 2 ways to have a intercepting filter in web tier- using Servlet filters or using a JSF phase listener that fires at the beginning of the Request Processing Lifecycle? For authentication and audit tasks which one should be used for the assignment?
Also, if intercepting filters based on servlet API are used, then how to depict them in component diagram i.e. show them:
1. between <<JSP>> and <<FacesServlet>> i.e. JSP -> Intercepting Filter -> FacesServlet -> Backing Bean
2. between <<FacesServlet>> and <<ManagedBean>> i.e. JSP -> Intercepting Filter -> FacesServlet -> Intercepting Filter

Thanks
Amit
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have put like this:

|<<Controller>> |--------------------uses-----------------|<<Phase Listener>>|
 
Kumar Amit
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajan Choudhary wrote:I have put like this:

|<<Controller>> |--------------------uses-----------------|<<Phase Listener>>|

Isn't this incorrect as Intercepting filters are invoked by servlet container before the request is handled by JSF(FacesServlet)
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Phase Listeners are configured in faces-config.xml file and hence they are executed by container on instruction of the controller during the JSF life phase. Let me know if this makes sense.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic