Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Mock Exam Doubts

Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Source: Examulator

Quiz : 2
Question 11:
Which of the following statements are true?
Choose at least one answer.
a. To be able to directly access a servlet the servlet-name must have a matching servlet-mapping Correct
b. The init-param tag may contain java code between its opening and closing brackets Incorrect
c. The welcome-file tag can mark a servlet as the default item that is returned from a url Correct
d. The welcome-file tag must point to a servlet called welcome Incorrect
e. The error-page tag must point to an html or JSP page, not a servlet Incorrect The error-page tag can point to any valid resource.

Answer Given: A,C
My Answer: E

Question: 21
Which of the following statements are true?
Choose at least one answer.
a. HttpServletResponseWrapper takes a constructor parameter of type HttpServletResponse Correct
b. Filters are called in the order they appear in the deployment descriptor Correct
c. Methods of the wrapper classes must not be overridden Incorrect
d. Filters are an example of the Intercepting Filter design patttern Correct
e. Filters can only be invoked on incoming requests, and not on a dispatcher forward or include Incorrect

Answer Given: A,B,D
My Answer: A,D
As <url-pattern> assoociated filter get higher priority than <servlet-name>
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The spec states, "The location element contains the location of the resource in the web application". The spec does not appear to restrict the type of resource that is allowed in the location element, and since a servlet is a resource, a servlet should be allowed. Since we are concerned with what is valid for the exam, we have to go with what is documented in the spec.

The other questions/answers are more obvious and appear to be as you have indicated.
Yeah, but is it art? What do you think tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic