File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes [HFSJ 2nd Edition] chapter 5 Mock Exam Question # 12 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

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

Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
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 ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60045
    
  65

This is not the forum to post mock questions. Please do so in the appropriate certification forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [HFSJ 2nd Edition] chapter 5 Mock Exam Question # 12
 
Similar Threads
Errata in HFSJ
[HFSJ 2nd Edition] chapter 5 Mock Exam Question # 12
RequestDispatcher.getNamedDispatcher() motivation
Doubts in Mock exam HFSJ
Doubt from HFSJ regarding request dispatcher question from ch5