Are application, pageContext and object of ServletContext
same or not?

Answers were Sorted based on User's Feedback



Are application, pageContext and object of ServletContext same or not?..

Answer / farhaananwar

application and object of ServletContext are same. In jsp
page application implicit variable represents object of
ServletContext but pageContext represent object whose super
class is SerlvetContext. the class of PageContext has some
conviniant methods for manipulation of attributes of
different scopes. These methods are findAttribute, get/set/
removeAttribute that accept last parameter as a int value
representing scope to which attribute pass to methods
belongs.
The PageContext has integral contant value for showing
scopes which are PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE
and APPLICATION_SCOPE. These constant values are used as a
last arguement to set/get/removeAttribute methods to
indicate to which scope the attribute belong. such a methods
and consant values are not present in its super class
ServletContext.

Is This Answer Correct ?    3 Yes 0 No

Are application, pageContext and object of ServletContext same or not?..

Answer / ramanareddy333

application and object of servlet context is same
remaining not same.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More JSP Interview Questions

How do I mix jsp and ssi #include? What is the difference between include directive & jsp:include action?

0 Answers  


What is scriptlet in jsp?

0 Answers  


How To maintain session ..?

3 Answers   TCS,


What is the use of Application Object and Session Object in JSP?

4 Answers   HCL, Symphony,


Mention the scope values for <jsp.usebean> tag.

0 Answers  


Explain the jspdestroy() method?

0 Answers  


How to print java variable in jsp?

0 Answers  


What is the <jsp:include> standard action?

0 Answers  


How many types of jsp tags are there?

0 Answers  


How can I prevent direct access to a jsp page from a browser?

0 Answers  


What do you mean by isscriptingenabled attribute?

0 Answers  


What is JSP?

3 Answers  


Categories