• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Question Bank ID : 52 Wrong?

 
pramoth suwanpech
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is Question Bank ID : 52 from JavaRanch's Sun Certified Web Component Developer Mock Exam
say:

<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?

answer :The webapp will not be loaded due to a parse exception of the DD.



Is answer correct?
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think the question is from the old exam. Before Servlet 2.4 spec the element order in the DD is important. In this case the listener class must be defined before servlet.

As per the SCWCD 1.4 (Spec 2.4) the order of top elemnts in the web.xml is not important.

Hope this help

Thanks
 
pramoth suwanpech
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. Dhande
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic