aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HF Final Mock Q27 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HF Final Mock Q27" Watch "HF Final Mock Q27" New topic
Author

HF Final Mock Q27

Ranjit Jana
Ranch Hand

Joined: Feb 17, 2005
Posts: 30
Page no 813.


The question says Redirect Http Request.

That means same request should be forwarded to next URL.

It is only possible to forward the same request by using Option D

Option A and C will create new Request Objects.

Await your response.

Regards.
--------------------------
Question @7 How would you redirect an HTTP request to another URL ?
(choose all that apply)

A(marked) response.sendRedirect("/anotherUrl");
C(marked)response.sendRedirect(response.encodeRedirectURL("\anotherURL");

D(not marked)
RequestDispatcher dispatcher = request.getRequestDispatcher("\anotherURL");
dispatcher.forward(request, response);

-------------------
I better frame it in this way what does the redirect Http request actually mean.
Francois Roland
Ranch Hand

Joined: Jul 24, 2003
Posts: 34

Probably the author of this question was referring to the HTTP request as the user sending an HTTP request to the application server. I think that you refer to the HttpServletRequest instance that is created whenever an application server receives an HTTP request.

Looking at all the questions I've already seen in mock exams, the term 'redirect' is always opposed to 'forward'.

Redirect means that the application server sends a response to the client with instructions to ask for a new URL location. Forward means that your servlet (or JSP, which is a servlet anyway) asks another resource to complete the request processing.

Forward is always hidden from the client, redirect is never.


--
Brown belt on KnowledgeBlackBelt.com.
muthulingam Jayakanthan
Ranch Hand

Joined: Feb 27, 2005
Posts: 43
Please help me to get this mock exam resource, and What you mena by page number and which book u are referring. Are there any e copy to refer the pages and mock exam
Ranjit Jana
Ranch Hand

Joined: Feb 17, 2005
Posts: 30
HF means Head First Jsps and servlets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HF Final Mock Q27