Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Application Context  RSS feed

 
berender mavi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Can anybody explain me what is an application context and how it is different from servlet context.

Please help.


Thanks
 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Application context is Spring more advanced container. It provides
a) a means for resolving text messages , include support for internationalization
b) a generic way to load file resources
c) events to beans that are registered as listeners
The three commonly used implementation of Application Context are as under
1) Class Path Xml Application Context : It loads context definition from an XML file located in the classpath
2) File System Xml Application Context : It loads context definition from an XML file in the filesystem
3) XML Web Application Context : It loads context definition from an XML file contained within a Web application
Servlet Context : 1) A Servlet Context defines a set of methods that a Servlet uses to communicate with its servlet Container.
2) There is only one Servlet Context for the entire webapp and all the servlets in a webapp share it

 
berender mavi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not worked on the spring.Can you please explain it according to jsp that would be helpful for me
 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application context comes in Spring only. i cannot explain according to Jsp
 
berender mavi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok that's fine.I was asked this question during the interview.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BalaMurali dhar wrote:Application context comes in Spring only. i cannot explain according to Jsp

Incorrect.

Application context is a JSP concept that is not at all limited to Spring. Application context consists of scoped variables that are kept in the servlet context.
 
berender mavi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Bear Bibeault :)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!