aspose file tools*
The moose likes JSP and the fly likes servlet context,page context and application context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "servlet context,page context and application context" Watch "servlet context,page context and application context" New topic
Author

servlet context,page context and application context

bhavya donepudi
Greenhorn

Joined: Feb 17, 2012
Posts: 1
What is the difference between servlet context,page context and application context?
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

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.
john wutka
Ranch Hand

Joined: Apr 14, 2011
Posts: 31
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

harsh kurra
Greenhorn

Joined: Jun 13, 2012
Posts: 1
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
 
Don't get me started about those stupid light bulbs.
 
subject: servlet context,page context and application context