Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is jsp server side or client side?

854


What is the use of pagecontext in jsp?

839


Which jsp life cycle is in correct order?

868


Can I declare a java class in jsp?

932


What is the difference between a jspwriter and a servlet printwriter?

896


What are custom tags?

793


Why do we need servlets and jsp?

931


How we can disable session in jsp?

908


What are jsp lifecycle methods?

978


What is session getattribute in jsp?

913


How can my application get to know when a httpsession is removed?

923


What are request and response objects?

899


What is jsp custom tag and what are it’s components?

810


Explain client-side and server-side validation.

824


What is a scriptlet in jsp and what is its syntax?

879