• Post Reply Bookmark Topic Watch Topic
  • New Topic

error in JavaRange Mock  RSS feed

 
Big Cat
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question Bank ID : 52 Section 3 - The Servlet
<web-app>
<servlet>
.....
</servlet>
<listener>
<listener-class>com.javaranch.LogListener</listener-class>
</listener>
</web-app>
The above entry in the Deployment Descriptor(DD) will result in which of the following:
(giving correct answer: )
The webapp will not be loaded due to a parse exception of the DD
Based on web-app_2_3.dtd, it should be ok.. did i miss anything?
 
satish kolli
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you need to define listeners fist and then your servlet. Try changing the order.. It will work..
Thanks!
Satish Kolli, SCJP2
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
yes, you have to define the listeners tag before servlet, some servers ignore this but tomcat doesn�t and a the most commons xml parsers too, so there�s no error in this question.
regards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!