Page 1 of 1

About Question enthuware.jwpv6.2.827

Posted: Thu Nov 15, 2012 11:20 pm
by Leandro
About the 4th option (Convert the data object into a String and append the String to the query part of the URL used to create RequestDispatcher).
According to Chapter 9 (9.4.2 Forwarded Request Parameters) of Servlet Specificaton 3.0, "...these attributes must always reflect the information in the original request even under the situation that multiple forwards
and subsequent includes are called."

Is it not valid for getQueryString() also?

Re: About Question enthuware.jwpv6.2.827

Posted: Sun Nov 18, 2012 7:41 am
by admin
You are right. The request parameters should not change. Although it works on some containers, it is not valid.

This option has now been marked incorrect. Thank you for your feedback!

Re: About Question enthuware.jwpv6.2.827

Posted: Sun Nov 18, 2012 5:05 pm
by Leandro
Thanks also!

Re: About Question enthuware.jwpv6.2.827

Posted: Thu Nov 22, 2012 9:12 am
by Leandro
I guess I was wrong.
The request parameters used to create RequestDispatcher can be accessed by the forwarded Servlet through the
request object.

9.4 The Forward Method
"The path elements of the request object exposed to the target servlet must reflect the
path used to obtain the RequestDispatcher."

Only the attributes added by the container (javax.servlet.forward.request_uri, javax.servlet.forward.context_path, javax.servlet.forward.servlet_path, javax.servlet.forward.path_info, javax.servlet.forward.query_string) must reflect the original paths.

Re: About Question enthuware.jwpv6.2.827

Posted: Sun Nov 25, 2012 11:32 am
by admin
Reverted back with added explanation.

thank you for your feedback!