Register Login
Internet / AI Technology University (ITU/AITU)
Created by info@itofthefuture.com
Welcome Anonimous.User to this quiz related to Test JSP and Servlets.

Read the question and choose correct answers. Time is limited to 40 seconds!

Important! Do not forget to rank the quality of the question (from bad to excellent).
An initiator of the quiz will get royalty score for QnAs created by her/him and can win the Top Creativity Prize.
Question:
Select right statements related to the JSP forward and redirect tags

jsp:redirect page="url"
The code above will be translated into:
RequestDispatcher rd = request.getRequestDispatcher(url);
rd.forward(request, response);



Both Forward and Redirect tags are essentially the same.
They redirect request from a JSP to another URL



jsp:forward page="url"
The code above will be translated into:
RequestDispatcher rd = request.getRequestDispatcher(url);
rd.forward(request, response);



jsp:forward page="url"
The JSP tag above will forward unhandled exceptions to the specified url for error handling



Both Forward and Redirect tags are essentially the same.
They redirect response to a different client

Expalanation
Objective: JSP expressions
jsp:forward page="url" will forward request from a current JSP to another URL.
The code above will be translated into:
RequestDispatcher rd = request.getRequestDispatcher(url);
rd.forward(request, response);

Here is the difference between Forward and Redirect:

Forward is performed internally by the servlet (or by a JSP converted into a servlet).
The same request comes to another servlet for a processing.
A browser takes no part in the process.

It is a different story with the Redirect.
The web application instructs the browser to fetch another URL.
An old request with all related data disappears and a new request from this new URL takes its place.



jsp:forward page="url" will forward request from a current JSP to another URL



Rank the Quality of the Question from "-10" (bad) or "0" (not clear) to 10 (correct) or even 20 (very good!)
-10 (bad/wrong) 0 (not clear) 10 (correct) 20 (very good!)
Your summary report will be available to you and your instructor. Thank you for your work!!!