This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock Exam 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 "Mock Exam Questions" Watch "Mock Exam Questions" New topic

Mock Exam Questions

munna next
Ranch Hand

Joined: Sep 28, 2004
Posts: 46
Hi Everyone,

These are some of the Mock Exam Questions. I am not sure about the answers. Can any one Pl explain what the correct answers could be.


1. When are transactions propagated from a Web component (JSP or Servlet) to an Enterprise Java Bean (EJB) component?

A. Only when the Web component starts the transaction using the UserTransaction interface
B. When the Web component starts the transaction using the UserTransaction interface or when transactions are demarcated in the component deployment descriptor
C. When the Web component starts the transaction using the Transaction interface
D. Only when the Web component is declared to use container managed transactions
E. When transaction demarcations are declared in the Web component deployment descriptor

1. Answer A.
2. How do you access tag body content from a JSP Custom Tag?
A. getPageContext().getString()
B. body.getString(1)
C. bodyContent.getString()
D. getPageContext.getReader()
E. getBodyContent()

2. Answer E.
3. Java Server Pages (JSP) contain a mixture of different elements.
Referring to the statement above, which one of the following CANNOT be used in JSPs?
A. Java scriptlets
C. Java bean deployment information
D. References to Java Beans
E. JavaScript

3.Answer C.
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
I think your answers are correct.

1. A
2. E
3. C
I agree. Here's the link:
subject: Mock Exam Questions
jQuery in Action, 3rd edition