• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

servlet context,page context and application context  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between servlet context,page context and application context?
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

bhavya donepudi wrote:What is the difference between servlet context,page context and application context?



Please SearchFirst.(⇐click) There's plenty of information readily available for "what is X" questions, and probably plenty available if you just paste that exact question into a google search.
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The pageContext object represents the environment for the page, containing useful information like page attributes, access to the request, response and session objects, as well as the JspWriter referenced by out. This object also has methods for including another URL's contents, and for forwarding or redirecting to another URL. For example, to forward a request to another resource from in a JSP page, we can do that by using the pageContext variable:

pageContext.forward ("other.jsp");

Here are interesting links

http://www.jguru.com/faq/view.jsp?EID=56477

http://grails.1312388.n4.nabble.com/Difference-between-Application-and-Servlet-contexts-td1322054.html

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

bhavya donepudi wrote:What is the difference between servlet context,page context and application context?



serveletcontext is javax.servlet.ServletContext class provide your server and it is available as 'application ' implicit object in jsp
usage=same as we use it in servelt

pagecontext is javax.servlet.jsp.PageContext and it is available as 'pagecontext' implicit object in jsp
usage=it has getattribute(),setattribute() method to bind the object to current page like Httpserveltcontext and it also have forward and include method
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!