• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock Exam Doubts

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic