File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 9293
    
  17

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: 61105
    
  66

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: 9293
    
  17

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))...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context