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

Mika Hirvasoja's Mock Exam

 
Raj Kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Mika Hirvasoja's Mock Exam, there is a question:
<servlet>
<servlet-name>someServlet</servlet-name>
<servlet-class>somePackage.someClass</servlet-class>
<description>This is some servlet</description>
</servlet>
Select true statements about the deployment descriptor entry above.
A Entry is valid
B <servlet-name> should not have a dash
C <description> cannot be used in this context
D <description> should be <servlet-description>
And the answer is:
C is true as the description tag is not a valid element of the servlet tag.
But from sun's dtd:
<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
(servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)>
Hmm..?? Whats wrong here?
 
faiza haris
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the order which is wrong....note that description comes before the servlet-class|jsp-file in the Deployment descriptor.
faiza
 
Raj Kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it! Thanks a lot
 
Stephen Tallamy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Blimey that's a picky question!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic