File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes SCWCD Mock Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "SCWCD Mock Questions " Watch "SCWCD Mock Questions " New topic

SCWCD Mock Questions

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634


I find the answers of the following 2 mock questions ambiguous.

Assuming that the Servlet Container has just called the destroy() method of a servlet instance, which of the following statements are correct?
Select 2 correct options.

A.Any resources that this servlet might hold have been released.
B.The servlet container time out has exceeded for this servlet instance.
C.The init() method has been called on this instance.
D.None of the requests can EVER be serviced by this instance.
E.All threads created by this servlet are done.

correct answer:C,D

I think answers should be:A,E

For a tag to accept any valid jsp code as its body, what should be the value of <body-content> for this tag's taglib descriptor?
Select 1 correct option.

E.The <body-content> subelement itself may be absent.

correct answer:JSP
I think answer should A and E both

OCPJP 6.0 93%
OCPJWCD 5.0 98%
Ricardo Espírito Santo

Joined: Nov 04, 2009
Posts: 25
Hey there,

Q1 You may have used a recordset for example and forgot to do a close() on it therefore A cannot be right. Also I may created a thread in my servlet and left it hanging with some work or even just sleeping without it being trashed.

While you can be sure that if the destroy() just executed then the servlet must have gonne throught its lifecycles being init() one of them.

The answer D leaves me puzzled since there is only once servlet instance by the jvm I thought the container would reuse the servlet instances...

Q2 Only one can be right and by default (i.e.: missing the body-content element) is scriptless.
I agree. Here's the link:
subject: SCWCD Mock Questions
It's not a secret anymore!