• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

SCWCD Questions

 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

----------------------------------------------------------------------------
 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Haina,
If that is the case(The tag must end with />, not only ">".) then why is
D.
correct answer ?
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Haina
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic