Hi All,
My example's output alone for your quick reference!
What was done? Forwarder.jsp simply forwards the request to Forwarded.jsp.
Forwarded.jsp also includes response from Included.jsp
All 3 JSPs in the same folder.
My request url http://localhost:9090/mani-examples/jsp/Forwarder.jsp?name="Mani" Output of Forwarded.jsp javax.servlet.forward.request_uri = /mani-examples/jsp/Forwarder.jsp
javax.servlet.forward.servlet_path = /jsp/Forwarder.jsp
javax.servlet.forward.context_path = /mani-examples
javax.servlet.forward.path_info = null
javax.servlet.forward.query_string = name="Mani"
Output of Included.jsp javax.servlet.include.request_uri = /mani-examples/jsp/Included.jsp
javax.servlet.include.servlet_path = /jsp/Included.jsp
javax.servlet.include.context_path = /mani-examples
javax.servlet.include.path_info = null
javax.servlet.include.query_string = null
Things to Note 1. Query
String parameter reflects the query string of the forwarding page.
2. Where as, request_uri, servlet_path, context_path reflect the information of the forwarded page.
Can someone explain the path_info ?