As I have studied, Application Server provides support to perform Dependency Injection, Security etc to an Enterprise Application.
I developed a demo project and did not install any application server but i installed Tomcat server. I used Spring framework and added Spring Jars for support in my project and performed dependency injection as well. So how come dependencies have been injected without even installing any application server?
Did Tomcat do this? or Jars are the application container?
thanks in advance
There are some unclearly defined concepts in this area. For example, Tomcat can act as an application server, it's just not a JEE application server (which needs to implement all of the JEE spec). See https://coderanch.com/wiki/659767/Web-Application-Server for a more thorough discussion on this.
As to dependency injection in particular, it doesn't need a JEE application server, nor in fact any application server - it works just fine in Java SE applications.
Spring provides its own dependency injection framework. It's not the same as CDI, which is the dependency injection framework used by JEE application servers. You can also use CDI in web application containers that don't fully support JEE, such as Tomcat, by adding a CDI implementation such as Weld.