Thursday, August 9, 2007

request scope attributes

request scope attributes for include and forward.
While doing include or forward by default following attributes will get populated. Below are them respectively.

javax.servlet.include.request_uri
javax.servlet.include.servlet_path
javax.servlet.include.context_path
javax.servlet.include.path_info
javax.servlet.include.query_string

javax.servlet.forward.request_uri
javax.servlet.forward.servlet_path
javax.servlet.forward.path_info
javax.servlet.forward.query_string

To access the attributes
Servlet / JSP: request.getAttribute("javax.servlet.include.request_uri")

EL: requestScope['javax.servlet.include.request_uri'] or ${requestScope.javax.servlet.include.request_uri}

No comments: