Are application, pageContext and object of ServletContext
same or not?
Answers were Sorted based on User's Feedback
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 |
Answer / ramanareddy333
application and object of servlet context is same
remaining not same.
| Is This Answer Correct ? | 0 Yes | 2 No |
Explain the difference between include directive and include action in jsp?
List the different scope values for the <jsp:usebean> tag in jsp?
How is jsp used in the mvc model?
Why does jcomponent have add() and remove() methods but the component does not?
What are the different life-cycle methods?
How can I extend the functionality of jsp?
How to call java method in jsp page on button click?
Why jsp is faster than servlet?
What program opens a jsp file?
What happens when a page is statically included in another jsp page?
What is a hidden comment?
What are the life-cycle methods for a jsp?