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

Java ranch mock exam

 
Boobalan Jegathesan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Today I attended Javaranch's mock exam I scored 72%(I need to prepare more)
I had one doubt with the following question present over there

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

1 Create a listener as defined by the com.javaranch.LogListener class.


2 Provide a Log Servlet for the entire application.


3 Log all session information as they occur.


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


what would be the answer?
As per Java ranch review answer is 4

but Its working fine for me when I put listener element after servlet element...

any suggestions regarding this would be greatly appriciated..

Thanks
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it would be the question of previous version not the current one j2ee 1.4.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the JavaRanch mock was for 1.3 which used to care about the ordering of elements in the web.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic