• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which of the following statements are true? and Why?

 
Marut pandey
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

According to me: A


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

According to me: A, D

I got zero mark for thses options in result. I am missing some option.

Can anybody help me find the correct options with reason.

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please quote your sources.
 
Marut pandey
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above questions I got on examulator.com under Simple Quiz 2 section. Kindly answer the question.
 
liao Yang
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Filters are called in the order they appear in the deployment descriptor Correct" is partially true. The order of filters being called is determined by both the order they appear in the DD and whether they are mapped to a url-pattern or to a single servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic