| Author |
SCWCD Questions
|
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
JPliotTest
During initialization the servlet instance can throw which exception.
Select 1 correct Choice.
A. ServletNotAvailableException
B. ServletException
C. UnavailableException
D. UnableToInitializeException
Correct answer is C
But according to
SRV.2.3.2.1 Error Conditions on Initialization
During initialization, the servlet instance can throw an UnavailableException or a ServletException.
Is the option C correct ?
-------------------------------------------------------------------
Which of the following are valid uses of the <jsp:useBean> action?
Select all 2 correct Choices.
A. <jsp:useBean id="myBean" class="MyBean" scope="session">
B. <jsp:useBean id="myBean" class="MyBean"/>
C. <jsp:useBean id="myBean" class="MyBean" beanName="SomeOtherBean"/>
D. <jsp:useBean id="myBean" type="MyBean">
Correct answer:B,D
Though 2 options have to be selected,
why can't option A not be included in the correct answer ?
we can specify scope with useBean action
--------------------------------------------------------------------------------------
Which of the following is a valid taglib directive?
Select 1 correct Choice.
A. <@ taglib tagPrefix="myTag" tagURI="taglibURI"%>
B. <@ taglib name="myTag" locationURI="taglibURI"%>
C. <@ taglib prefix="myTag" uri="taglibURI">
D. <@ taglib prefix="myTag" uri="taglibURI"/>
Correct answer is D
Why isn't C correct ?
C seems to be valid syntax
----------------------------------------------------------------------------
|
OCPJP 6.0 93%
OCPJWCD 5.0 98%
|
 |
Haina Minawa
Ranch Hand
Joined: Oct 13, 2011
Posts: 119
|
|
mohitkumar gupta wrote:
Which of the following are valid uses of the <jsp:useBean> action?
Select all 2 correct Choices.
A. <jsp:useBean id="myBean" class="MyBean" scope="session">
B. <jsp:useBean id="myBean" class="MyBean"/>
C. <jsp:useBean id="myBean" class="MyBean" beanName="SomeOtherBean"/>
D. <jsp:useBean id="myBean" type="MyBean">
Correct answer:B,D
Though 2 options have to be selected,
why can't option A not be included in the correct answer ?
we can specify scope with useBean action
--------------------------------------------------------------------------------------
Which of the following is a valid taglib directive?
Select 1 correct Choice.
A. <@ taglib tagPrefix="myTag" tagURI="taglibURI"%>
B. <@ taglib name="myTag" locationURI="taglibURI"%>
C. <@ taglib prefix="myTag" uri="taglibURI">
D. <@ taglib prefix="myTag" uri="taglibURI"/>
Correct answer is D
Why isn't C correct ?
C seems to be valid syntax
----------------------------------------------------------------------------
The tag must end with />, not only ">".
|
 |
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
Thanks Haina,
If that is the case(The tag must end with />, not only ">".) then why is
D. correct answer ?
|
 |
Haina Minawa
Ranch Hand
Joined: Oct 13, 2011
Posts: 119
|
|
mohitkumar gupta wrote:Thanks Haina,
If that is the case(The tag must end with />, not only ">".) then why is
D. correct answer ?
Definitely it is wrong if the tag does not end with "/>"
|
 |
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
Thanks Haina
|
 |
 |
|
|
subject: SCWCD Questions
|
|
|