• Post Reply Bookmark Topic Watch Topic
  • New Topic

HFSJ Mock Qn on Front Controller

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mock Exam Chap14 Question1:

given this list of attributes:
- related to Intercepting Filter
- supports role separation between developers
..
which design pattern is being described
Ans: Front Controller

My question is how Front Controller "related" to Intercepting Filter? The answer given by book refers to Core J2ee Pattern. I actually looked up that book and it only says "...is similar to the Intercepting Filter". I just cannot see how the two are related. Could anyone explain their relationship?
 
Gouri Bargi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not very sure ... but as I remember it, you usually use /intercepting Filter and Front Controller together. Front Controller ensures that there is a single point of control in the web tier, which makes it easier to place intercepting filters.

The servlet filters introduced in specs version 2.3 provided a great way for applying filters on http requests. Before version 2.3, configuring a filter for all requests was tough without a front controller.

- Gouri
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!