• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Am I too picky or is this question wrong..?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following statements are true?

Choose at least one answer.
A. A filter must extend the HttpFilter class Incorrect
B. A filter must implement the Filter interface Correct
C. Filters are chained to servlets through the flter tag in the deployment descriptor Correct
D. A filter must be mapped to one and only one servlet Incorrect
E. A filter may be mapped either to a single servlet or to multiple servlets via a URL pattern Correct

The answers are B, C, and E, but I don't agree with C. I believe the filters are chained to servlets through the "<filter-mapping>", not "<filter>" tag, because <filter> declares a filter, not saying anything about the associated servlet.

Am I being too picky or is the question wrong..? Thanks.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are too picky. but i would like to see some Authors or Gurus take on this.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you're being too picky at all. That would've put me off C also.

The exam expects US to be spot on precise so THEY better be as well!
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you really want to be picky (which is good ), filters are chained to other filters, and it is the final filter in the chain which then passes the request to either a servlet (including a JSP) or a static resource. It is the <filter-mapping> tag in the DD which declares a filter to be part of a filter chain for a matching request, and the order of the tags in the DD is synonymous with the order of the filters in the chain.

You're not being too picky, you are correct that option C contains that mistake! Where does the question come from?
 
Ashish Gauswami
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dont say that its from Enthuware...i have already purchased it and i am doing mocks right now.
 
Jean Robillard
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To answer Charles's question, the question is from Marcus Green's mock exam 3.

http://www.examulator.com/moodle/course/view.php?id=5&topic=all

I'm not trying to knock Marcus here, I think his mock exams are really helpful.
reply
    Bookmark Topic Watch Topic
  • New Topic