Q:
For JSP scopes of request and page, what type of object is used to store the attributes?
Select 1 correct option.
a HttpServletRequest and ServletContext respectively.
b ServletRequest and ServletConfig respectively.
c ServletRequest and PageContext respectively.
d HttpServletRequest and PageContext respectively.
e ServletConfig for both.
The answe to this question is c, but in my opinion it should be d.
The exaplination which is given for answer-c is as follows:
-----------------------------------------------------
Although HttpServletRequest is a subclass of ServletRequest, the feature of storing attributes is common to all servlets and jsps and not just HttpServlets and JSPs for HTTP.
-----------------------------------------------------
But as per JSP 2.0 specification data type for request and response is HttpServletRequest and HttpServletResponse respectively.
Please advise.
For JSP scopes of request and page, what type of object is used to store the attributes?
Select 1 correct option.
a HttpServletRequest and ServletContext respectively.
b ServletRequest and ServletConfig respectively.
c ServletRequest and PageContext respectively.
d HttpServletRequest and PageContext respectively.
e ServletConfig for both.
The answe to this question is c, but in my opinion it should be d.
The exaplination which is given for answer-c is as follows:
-----------------------------------------------------
Although HttpServletRequest is a subclass of ServletRequest, the feature of storing attributes is common to all servlets and jsps and not just HttpServlets and JSPs for HTTP.
-----------------------------------------------------
But as per JSP 2.0 specification data type for request and response is HttpServletRequest and HttpServletResponse respectively.
Please advise.