what is the difference between page and pageContext
implicit variables
Answer Posted / guest
The implicit variable page is of class java.lang.Object and
it refers to instance of generated servlet. It is declared as
Object page=this
Consider
<%= page.getServletInfo() %> will give Error
getServletInfo() is not a method of java.lang.Object
<%= ((Servlet)page).getServletInfo() %> is valid
pageContext variable is of type
javax.servlet.jsp.PageContext. The PageContext class is the
abstract class and JSP engine vendor provides its concrete
subclass.
·Store reference to implicit objects,
·Provide method to get and set attributes in different scopes.
·Provide convenience methods for transferring request to
other resources in web application.
PageContext.forward(“other.jsp”);
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What is the difference between session scope and request scope when saving formbean ?
What is the purpose of @conversion?
Why do the struts tags provide for so little formatting?
Why use struts framework in java?
Which components are available using actioncontext map?
Who wrote struts?
What’s the difference between struts and turbine?
What is the purpose of @typeconversion annotation annotation?
State an example of struts configuration file as an action parameter for action servlet.
What does apache struts do?
What are the main classes which are used in struts application?
What is the purpose of @key?
Do we need to pay the struts if being used in commercial purpose?
Explain about the
Describe validate() and reset() methods.