File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes javaranch mock exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "javaranch mock exam" Watch "javaranch mock exam" New topic
Author

javaranch mock exam

Radmika Arunachalam
Ranch Hand

Joined: Mar 29, 2004
Posts: 45
Hi,
Given



My answer: D
The answer given: A

Is it true in current spec? please advice
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
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 ]

Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Sam Sun
Ranch Hand

Joined: Feb 01, 2005
Posts: 60
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

Joined: Mar 29, 2004
Posts: 45
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
shri mon
Ranch Hand

Joined: Jan 11, 2005
Posts: 63
I think the <servlet-mapping> tag is missing.
That is why we are having the parse error.

Thanks,
Shrimon.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javaranch mock exam