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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

[HFSJ 2nd Edition] chapter 5 Mock Exam Question # 12

 
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have completed chapter 5 and while taking the mock exam i couldn't answer few questions.
1)

Which statements about RequestDispatcher are true (where applicable, assume the RequestDispatcher was not obtained via a call to getNamedDispatcher())? (Choose all that apply.)
A. A RequestDispatcher can be used to forward a request to another servlet.
B. The only method in the RequestDispatcher interface is forward().
C. Parameters specified in the query string used to create a RequestDispatcher are not forwarded by the forward() method.
D. The servlet to which a request is forwarded may access the original query string by calling getQueryString() on the HttpServletRequest.
E. The servlet to which a request is forwarded may access the original query string by calling getAttribute(�javax.servlet.forward.query_string�) on the ServletRequest.

Option A and E are the correct one.My question is How a RequestDispatcher can be used to forward a request to another servlet? As this is not explained in the book I couldn't answer it correctly.
[ December 04, 2008: Message edited by: Vishal Pandya ]
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is not the forum to post mock questions. Please do so in the appropriate certification forum.
 
I don't even know how to spell CIA. But this tiny ad does:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic