• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCWCD ExKit, Chapter 5, question 1

 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm a bit confused by the first review question for Chapter 5 in SCWCD Exam Kit. The question is:
which element is used to specify useful information about an initializaton parameter of a servlet in the deployment descriptor?
a) param-description
b) description
c) info
d) param-info
e) init-param-info
The answer is: b, description, with the reasoning being that "the description element is used for all elements that can take a description. This includes servlet, init-param..."
But the dtd for servlet element as described on page 72 says this:
<!ELEMENT Servlet (icon*, servlet-name, display-name*, description?, (servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)>
I'm barely fluent in xml but I would think this means that both description and init-param are optional attributes and that init-param is the relevant one here, even though it's not listed in the answers.
Can someone explain why "description" is the correct answer?
Thanks a lot,
Ken
 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have I seen the light, and properly understood the question?
Does the answer mean that the "useful information about an initilialization parameter" is put in the description attribute of the init-param element? And not in the description attribute of the servlet element as I first understood the answer?
 
Bhushan Jawle
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are correct that is what the uqestion means.
Thanks,
Bhushan
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apart from "description" element, no other options given are valid as per deployment descriptor specification mentioned in DEployemnt Descriptor of Servlet Specification 2.3. So becareful while doing elimination process to find the appropriate answer.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ken Januski:
I'm barely fluent in xml but I would think this means that both description and init-param are optional attributes and that init-param is the relevant one here, even though it's not listed in the answers.
Can someone explain why "description" is the correct answer?
Thanks a lot,
Ken

Init-parameter contains the parameter and its value. Information "about" the parameter ( for eg. what is means to the servlet etc.) goes in the description.
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken Januski,
Never get confused with the options given for the question. First, if u are not sure of the correct option, try to go for elimination. In the real exam, there are few questions that confuse you like this. Best way to pick the correct answer is eliminate the options which doesn't match exactly in the deployment descriptor specified elements.
So accroding to this only element that is correct is 'description' element. Please find the other one is 'init-param-info', not 'init-param'.
If 'init-param' is there in the option, 'init-param' will be the correct answer, as it is more appropriate.
<!ELEMENT init-param (param-name, param-value, description?)> gives all the useful information about initialization parameters of servelet.
GVRao
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic