Thanks <br />Poonam Agarwal SCWCD 86%
Poonam Agarwal wrote:1. what is the difference between
ServletContext.getRequestDispatcher("url"). AND ServletContext.getNamedDispatcher(""). I guess they both are used to get the RequestDispatcher Object?
Poonam Agarwal wrote:2. where can we used include() and where forward(). what are the differnces. Is include() include the content of the includede servlet at request time?
Poonam Agarwal wrote:3. The following request attributes must be set before calling include() and forward()
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
Is this create any difference if they will set by the include() OR forward() method.
Poonam Agarwal wrote:4. request_uri and servlet_path attributes are behave same??
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Regards,<br />Sourin.
Thanks <br />Poonam Agarwal SCWCD 86%
Thanks <br />Poonam Agarwal SCWCD 86%
Poonam Agarwal wrote:
called with url /testapp/index.jsp?foo=original
index.jsp contains <jsp:foward page="target.jsp"/>
:
3.request.getAttribute("javax.servlet.include.query_string")
in target.jsp returns foo=original
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Thanks <br />Poonam Agarwal SCWCD 86%
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|