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?
About Question enthuware.jwpv6.2.827
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.827
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!
This option has now been marked incorrect. Thank you for your feedback!
Re: About Question enthuware.jwpv6.2.827
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.
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.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.827
Reverted back with added explanation.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 4 guests