• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

SCWCD Questions

 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks Haina
 
It's a tiny ad only because the water is so cold.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic