• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java ranch mock exam

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it would be the question of previous version not the current one j2ee 1.4.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic