• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

javaranch mock exam

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Given



My answer: D
The answer given: A

Is it true in current spec? please advice
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Order matters in web.xml, this order is required:

context-param
listener
servlet
servlet-mapping
session-config
welcome-file-list
taglib
security-constraint
login-config

And in your example servlet is coming before listener so this won't be compile
[ July 06, 2005: Message edited by: Pawan Ramchandani ]
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Radmika,

Your answer is perfectly write. The j2eecertificate exam is based on the old servlet specifications i.e 2.3. In that version of specification the order of elements is important. But as per the Servlet 2.4 servlet specification the order of top elements under <web-app> is not required. I mean you can specify the elements in any order.

Hope it help you.

Thanks
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It's true. The order doesn't matter. I tried to declare the listener after servlet. It works. Maybe some other reason results in answer A.
 
Radmika Arunachalam
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Friends.. I was trying to find the same in JSP 2.0 SPEC But it was mentioned in servlet 2.4 spec..

Thanks once again..
Radmika
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the <servlet-mapping> tag is missing.
That is why we are having the parse error.

Thanks,
Shrimon.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shri,

Missing <servlet-mapping> element does not give any parse error but it will create a problem when you you try to access the servlet.

Thanks
 
Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic