what is the difference between page and pageContext
implicit variables
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / rajesh rakam
Page:
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
<%= ((Servlet)page).getServletInfo() %> is valid
pageContext:
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 ? | 5 Yes | 0 No |
When do I need “struts.jar” on my classpath?
how many methods are there in RequestPrccesor class?
What is the configuration files used in struts?
what is the purpose of action servlet and action?
Even though Servlets and JSP are web based concepts .wht is the use of using Struts using then
What are result types in struts?
What do you know about validation plugin ?
What is spring hibernate and struts in java?
How duplicate form submission can be controlled in struts?
What is http forward?
What are Struts2 core components?
Can we write Structs application without using Action Class directly or indirectly(extends Action class)