• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

another disagreement with test question

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

In question 65 on p824 of HFJS (which I can't repeat here due to time constraints) they mark answer C as among correct, which basically says that the doFilter() method of a filter you implement MUST include a call to chain.doFilter(). They even say exactly that in the notes, I quote: "if nothing else, doFilter() must invoke chain.doFilter()".

There is no mention in the question of any requirement that the next filter or even the servlet be processed. Only that "a programmer is creating a Java EE web application". But even in that case there it is not a MUST to call chain.doFilter(). A "Java EE web application" could certainly implement a filter that never calls chain.doFilter(). As a matter of fact, from what I understand of Struts 2, they have filters that never call chain.doFilter(). Instead they call their own framework classes (could be wrong though, haven't actually worked with it).

Ok, I agree I'm just whining here, and I have no actual question. But I just need to share with someone that it concerns me that the people who wrote the test I am about to take have used such inaccurate language in their sample test questions.

Opinions are welcome, of course.

Nice day to all,
John
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I quote: "if nothing else, doFilter() must invoke chain.doFilter()".

That's a wrong statement. There are plenty of uses of Filters which deliberately do not call the next in the chain, for example authorisation checkers which deny access. You mentioned before you have a copy of my book, so Figure 7.3 on p.160 and the skeleton code example on p.164 both emphasise why and when not to pass to the next filter.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need Charles Lyons book my friend ;]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

it concerns me that the people who wrote the test I am about to take have used such inaccurate language in their sample test questions.


Don't worry, the exam are more explicit.
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



You need Charles Lyons book my friend ;]



Yes, I'm reading it now. I like its style. And the simulation questions are not ambiguously worded.

This topic is huge and I doubt anyone can really master the material from any one single test prep book. I think one should read at least two of them.
 
author
Posts: 9000
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JohnWilliam,

In question 65 on p824 of HFJS (which I can't repeat here due to time constraints



I don't have a copy of the book with me, it's possible that you found an error, but in general it's WAY better to post the entire mock question, wherever you got it from, when you raise a doubt. Again, while you might have found an error, in many cases candidates miss a subtle aspect of the question which is lost if the entire question isn't posted. In other words, maybe you got the context correct, and maybe you didn't.

Please post the entire question when you've got the time!

Thanks,

Bert
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Wow, I got the author to reply! How cool is that?)

Hi Bert. Thanks for jumping in.

I definitely could have missed a subtle aspect. That's why I post asking for opinions.

And I would LOVE to post the whole thing! Um, is it from somewhere cut/pastable? It's a biggy. If I mistype something I could squelch the subtlety that maybe caused my misunderstanding in the first place (or introduce a NEW subtlety that wasn't even supposed to be there!)

Regards, JohnWilliam
 
The knights of nee want a shrubbery. And a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic