• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

implicit objects question

 
mohamed ewis
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements are correct? ( choose 2 )
1 - The implicit variable 'session' can be used to store values needed by other servlets or JSPs of the same web application.

2 - The implicit variable 'request' can be used to store values needed by other servlets or jsps across multiple requests.

3 - You can use the implicit variable 'response' to set the content type of the output.

4 - The implicit variable 'out' is same as returned by response.getWriter()

5 - All JSPs have access to 'request', 'response' and 'session' variables.

why choice #4 is not correct
mock exam answers was #1 & # 3
 
Krishna Srinivasan
Ranch Hand
Posts: 1876
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
response.getWriter() returns type of PrintWriter. But 'out' is type of JspWriter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic