Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Please clarify these questions  RSS feed

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks i found the following questions and answer sets at javabeat...

The following were confusing for me..

Can anyone please clarify them


19. Which of the given statements are correct regarding the following JSP page code?

<jsp:useBean id="mystring" class="java.lang.String" />

<jsp:setProperty name="mystring" property="*" />

<%=mystring%>

Assume that the request for this page contains a parameter mystring=hello.

Select 1 correct option.
A.It will print ""
B.It will print "hello"
C.It will not compile
D.It will throw exception at runtime



ANS : A

---------------------------
20. Select the correct sequence of actions that a servlet container performs before servicing any request.

A.Instantiate listeners defined in the deployment descriptor
B.Initialize filters defined in the deployment descriptor
C.Initialize servlets that are set to load on startup
D.Call the contextInitialized method on the listeners implementing ServletContextListener interface

ANS: A,D,B,C

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the first question:

I am not sure but the class defines the bean type (which has setters and getters). java.lang.String is not a class that contains these types of methods so I think you are unable to use it for the class. If I am wrong, someone please tell me.
[ January 30, 2007: Message edited by: Kevin DesLauriers ]
 
Kevin DesLauriers
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The second question is correct. It does listeners, context, filters then servlets.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!