Hi all, I've been stuck on this question for awhile, I can't seem to find any answers it. Any help would be appreciated.
My problem lies with Answer D which the book says should be true : "The servlet to which a request is forwarded may access the original query string by calling getQueryString() on the ServletRequest."
Now it is my understanding from reading the Servlet Spec. Ch. 8 that :
a. The original query string will be stored in the "javax.servlet.forward.query_string" attribute of the ServletRequest object,
"The values of these attributes must be equal to the return values of the HttpServletRequest methods getRequestURI, getContextPath, getServletPath, getPathInfo, getQueryString respectively, invoked on the request object passed to the first servlet object in the call chain that received the request from the client." Pg. 66
b. The query string of the forwarded servlet is accessible through the request.getQueryString() method.
"The path elements of the request object exposed to the target servlet must reflect the path used to obtain the RequestDispatcher." Pg.66
Doesn't this mean you can only get the original query string from the javax.servlet.forward.query_string attribute, and not the getQueryString method as stated in the answer ? [ September 27, 2005: Message edited by: Jeremy Leong ]