Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question

 
Raj Kumar
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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

b. The init-param tag may contain java code between its opening and closing brackets

c. The welcome-file tag can mark a servlet as the default item that is returned from a url

d. The welcome-file tag must point to a servlet called welcome

e. The error-page tag must point to an html or JSP page, not a servlet

The correct ans as given my mock exam is options A&C and according to me is only option e.

Pls let me know your views and an explanation for that too.

thanks for your time,

bye,
RajKumar
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A and C are the correct options. A servlet can also be marked both as a welcome file and an error page. Think of it....a JSP is ultimately a servlet. What all a JSP can do, a servlet can do.
 
Raj Kumar
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi Shankar Kumar Sankararaj,
thanks for the reply, tried to invoke a servlet on exception and it worked. great thanks for that

Can you pls explain how can we achieve the option C ?

i can't understand what they ask in the first option? if possible pls explain that.

Thanks for your valuable time,

bye,
RajKumar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic