• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Mock question

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic