• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

SCWCD Questions  RSS feed

 
Ranch Hand
Posts: 634
Chrome Eclipse IDE 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
Chrome Eclipse IDE 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
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Haina
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!