JavaBeat
Search JavaBeat

Certification Kits
SCJP 1.5 Exam Questions
SCJP 1.6 Exam Questions
SCWCD 1.4 Exam Questions
SCWCD 5.0 Exam Questions
SCBCD 5.0 Exam Questions
SCWCD 1.4 Links
SCWCD 1.4 Home
SCWCD Books
Newbie
Objectives
Tutorials
Mock Exams
300 Mock Exams
SCWCD Mock - 1
SCWCD Mock - 2
SCWCD Mock - 3
SCWCD Mock - 4
SCWCD Mock - 5
SCWCD Mock - 6
SCWCD Mock - 7
Forums
Certification Links
SCJP 1.4
SCJP 1.5
SCJP 1.6
SCWCD 1.4
SCWCD 5.0
SCBCD 5.0
SCEA
SCEA 5.0
JavaBeat
Home
Articles
Tips
Code
QnA
Forums
300 Mock Questions on SCWCD 1.4 - JUST Rs.250 or 10 USD
Send us mail to sales@javabeat.net
more details
Do you have paypal account? Click Here to pay now and get the questions.

SCWCD 1.4 Mock Questions - 3

1. Regarding the processing of a BodyTag handler, in which of the following cases a BodyContent object will be "pushed" into the pageContext?

Select 1 correct option.
A.If the doStartTag() returns EVAL_BODY_INCLUDE
B.If the doStartTag() returns EVAL_BODY_BUFFERED
C.If the doStartTag() returns SKIP_BODY
D.If the doStartTag() DOES NOT return SKIP_BODY
E.A BodyContent object it is always created and pushed no matter what doStartTag() returns

2.Which of the following apply to Transfer Object design pattern?

Select 2 correct options.
A.It increases complexity by increasing the number of remote interfaces.
B. It increases network performance by introducing one coarse grained remote call for multiple finer grained network calls
C.It reduces network traffic by introducing one coarse grained remote call for multiple finer grained network calls
D.It increase server throughput by utilizing the CPU better
E.It increases design overhead due to versioning issues

3.Which of the following deployment descriptor snippets would you use to declare the use of a tag library?


1.

<tag-lib>

 <uri>http://abc.net/ourlib.tld</uri>

 <location>/WEB-INF/ourlib.tld</location>

</tag-lib>



2.

<taglib>

 <uri>http://abc.net/ourlib.tld</uri>

 <location>/WEB-INF/ourlib.tld</location>

</taglib>



3.

<taglib>

 <taglib-uri>http://abc.net/ourlib.tld</taglib-uri>

 <taglib-location>/WEB-INF/ourlib.tld</taglib-location>

</taglib>



4.

<taglib>

 <tagliburi>http://abc.net/ourlib.tld</uri>

 <tagliblocation>/WEB-INF/ourlib.tld</location>

</taglib>



5.

<taglibmap>

 <uri>http://abc.net/ourlib.tld</uri>

 <location>/WEB-INF/ourlib.tld</location>

</taglibmap>
Select 1 correct option.
A.1
B.2
C.3
D.4
E.5

4.Which of the following design patterns is used to separate the task of writing the GUI screens and business logic?

Select 1 correct option.
A.View Logic
B.Front Controller
C.Model View Controller
D.Business View
E.Business Delegate

5. For this jsp code to compile and run which of the given options should be true? <jsp:useBean class="com.bookstore.Book" type="java.lang.Object" id="book" />

Select 1 correct option.
A.This statement is wrong as type attribute is invalid.
B.Book must have a public no args constructor
C.Book must have a public constructor but there is no requirement on arguments.
D.Book must have a public getInstance() method.
E.This statement will always throw an exception at runtime no matter what you do to Book class.

6.Your servlet may throw IOException while processing a request. You want to define an error page in your deployment descriptor so that whenever IOException is thrown, this page is serviced to the browser. Which of the following XML fragments correctly specify the mapping:


1.

  <error-page>

    <exception>java.io.IOException</exception>

    <location>/html/Test.html</location>

  </error-page>



2.

  <error-page>

    <exception-class>java.io.IOException</exception-class>

    <location>/html/Test.html</location>

  </error-page>



3.

  <error-page>

    <exception-type>java.io.IOException</exception-type>

    <page-location>/html/Test.html</page-location>

  </error-page>



4.

  <error-page>

    <exception-type>java.io.IOException</exception-type>

    <location>/Enthuse/html/Test.html</location>

  </error-page>



5.

  <exception>

    <exception-type>java.io.IOException</exception-type>

    <location>/Enthuse/html/Test.html</location>

  </exception>
Select 1 correct option.
A.1
B.2
C.3
D.4
E.5

7.Select the tag that comes directly under the <web-app> tag of a web.xml and that is used to specify a class whose object will be sent notifications when changes occur to the SevletContext?

Select 1 correct option.
A.servlet-context-listener
B.listener
C.context-listener-class
D.listener-class
E.context-listener

8.Consider the following JSP code (See exhibit).
What will it print for the very first request to this page as well as the web application that contains this page?


<html><body>

<%

    Integer count = (Integer) request.getSession(false).getAttribute("count");

    if(count != null )

    {

        out.println(count);

    }

    else request.getSession(false).setAttribute("count", new Integer(1));

%>

Hello!

</body></html>
Select 1 correct option.
A.It will print Hello!
B.It will print Hello and will set the count attribute in the session.
C.It will throw a NullPointerException at request time.
D.It will not compile.

9. The following line of code exists in the doGet method of Servlet:
String sid = request.getParameter("jsessionid");
Which of the options will retrieve the HttpSession associated with the request? (Assume that the session has already been created.)

Select 3 correct options.
A.HttpSession session = request.getSession();
B.HttpSession session = HttpSession.getSession(sid);
C.HttpSession session = request.getSession(sid);
D.HttpSession session = request.getSession(true);
E.HttpSession session = request.getSession(false);

SCWCD Mock Questions 3 - Answers


Sponsors
Webmaster Hosting Forum
Java Jobs
Latest in DLinks
http://javawave.blogspot.com/2008/04/quartz-job-scheduler-part-ii-example.html
Quartz Job Scheduler -- Part 1 (Setting up development project in Netbeans 6.1 beta)
Flex Messaging with BEA Workshop Studio
SOA and Virtualization: How do They Fit Together?
Introduction to Enterprise Portals - Why they Benefit IT and the Business
BEA WebLogic Operations Control: Application Virtualization for Enterprise Java
Best Practices for Building Production Quality EAR Files
BEA's SOA Reference Architecture - A Foundation for Business Agility
Blueprint for Successful SOA Integration
Guardian - What a tool!

JavaBeat Media (2004-2008), India
javabeat home | About Us
our network : opensource softwares
Copyright © 2007 JavaBeat