Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Application Context

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Application context comes in Spring only. i cannot explain according to Jsp
 
berender mavi
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok that's fine.I was asked this question during the interview.
 
Sheriff
Posts: 67650
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Bear Bibeault :)
 
reply
    Bookmark Topic Watch Topic
  • New Topic