aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "SCWCD Mock Questions " Watch "SCWCD Mock Questions " New topic
Author

SCWCD Mock Questions

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

javabeat


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

q1.
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

-------------------------------------------------------------------------------------------
q2.
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.

A.JSP
B.jsp
C.any
D.text
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
Greenhorn

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.
 
Consider Paul's rocket mass heater.
 
subject: SCWCD Mock Questions
 
Similar Threads
jwebplus doubt?
A Mock Question
JDiscuss.com Question
Mock Exam Queries from JDiscuss..
sample questions