This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Intercepting Filters in Component diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Intercepting Filters in Component diagram" Watch "Intercepting Filters in Component diagram" New topic
Author

Intercepting Filters in Component diagram

Kumar Amit
Ranch Hand

Joined: Aug 13, 2001
Posts: 103
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


SCJP, SCJD, SCEA
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
I have put like this:

|<<Controller>> |--------------------uses-----------------|<<Phase Listener>>|
Kumar Amit
Ranch Hand

Joined: Aug 13, 2001
Posts: 103
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

Joined: Mar 17, 2011
Posts: 196
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Intercepting Filters in Component diagram
 
Similar Threads
Filter being called for Struts' forwarded JSP
Security Question - Part 2
Dependencies in Component Diagram
Component Diagram and Part 2
HFSJ Page 696 decalring filters in DD