0

can someone please explain to me the followings:

  1. what is is ApplicationContext ?
  2. what is the difference between ApplicationContext and HttpSession?

found this implementation but can't understand the concept. http://mythinkpond.wordpress.com/2010/03/22/spring-application-context/

Qix - MONICA WAS MISTREATED
  • 13,194
  • 13
  • 82
  • 139
0x90
  • 37,093
  • 35
  • 149
  • 233
  • A similar post can be found [here][1] [1]: http://stackoverflow.com/questions/6145091/the-term-context-in-programming – Fahim Jan 02 '13 at 06:14

1 Answers1

1

Java EE has the concept of an ServletContext, which is an interface for communicating with the container that is running a Java EE application.

The Spring framework has an ApplicationContext class which is a way of communicating with the Spring container. In other words, it's a high level way of communicating with the Spring framework.

An HttpSession is state maintained by an application server for a series of requests made by a client. The HTTP protocol itself is stateless, so this is a way to keep some data about the user's interactions around.

Arjan Tijms
  • 37,353
  • 12
  • 107
  • 135
hvgotcodes
  • 114,474
  • 29
  • 200
  • 234
  • can you please detail some more about the concept of the application Context? i don't get why the application context good for? how it makes things state-full and not stateless? thanks :) – 0x90 Jan 19 '12 at 12:28