aspose file tools
The moose likes Servlets and the fly likes Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Context" Watch "Context" New topic
Author

Context

Mukesh Jaswani
Greenhorn

Joined: Nov 14, 2009
Posts: 2
How many types of context are there?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9326
    
  19

Hi Mukesh, can you explain your question a bit clearly. There's a ServletContext class which represents the context in which a web application runs. What other contexts are you expecting??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61981
    
  67

The term context can be applied to many things.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mukesh Jaswani
Greenhorn

Joined: Nov 14, 2009
Posts: 2
In one Java/J2EE interview,I have been asked how many types of context are there?...
I know Servlate Context (application context), but i don't knwo how to respond this
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9326
    
  19

There is only one context if you consider the word in a class name. There used to be a SessionContext which is now deprecated. So the simple answer to the question would be "there's one context, that's servlet context". To be frank the question doesn't make much sense to me. On first glance it looked to me about attribute scopes (which are context, session, request and page (only JSPs))...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Context