This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Thanks for posting the reply. I was late in responding because I wanted to be sure I did not misunderstand the question. I think I did not.
The question says "first" and "last" are request attributes. So even if placing 'out' before 'println()' statements in option D would be syntactically correct, it is still logically wrong as application.getInitParameter() gets you the context parameters and not the request parameters.
For retrieving request parameters, we need to use request object and thus option D would continue to be a wrong choice after using the implicit object 'out'.