Linked Questions

390 votes
6 answers
181k views

Difference between applicationContext.xml and spring-servlet.xml in Spring Framework

Are applicationContext.xml and spring-servlet.xml related anyhow in Spring Framework? Will the properties files declared in applicationContext.xml be available to DispatcherServlet? On a related note, ...
user448070's user avatar
  • 4,035
205 votes
4 answers
169k views

What is the difference between ApplicationContext and WebApplicationContext in Spring MVC?

What is the difference between Application Context and Web Application Context? I am aware that WebApplicationContext is used for Spring MVC architecture oriented applications? I want to know what ...
Sumit Trehan's user avatar
  • 3,985
43 votes
2 answers
26k views

Spring-MVC: What are a "context" and "namespace"?

From XmlWebApplicationContext javadoc: By default, the configuration will be taken from "/WEB-INF/applicationContext.xml" for the root context, and "/WEB-INF/test-servlet.xml" for a context with ...
rapt's user avatar
  • 12.1k
3 votes
2 answers
32k views

parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml];

I am getting a few errors in the console which I will post below. I am using eclipse and cleaned the project, refreshed the target, cleaned the tomcat server so chasing or anything of that nature is ...
Mike3355's user avatar
  • 11.9k
11 votes
1 answer
4k views

Don't understand the concept of a context in Java EE

Ive been learning Spring, JSP and servlets. I don't understand the concept of a context root. There are so many of them. SpringContext root, servlet context root and there may be others. In a Spring ...
Horse Voice's user avatar
  • 8,268
2 votes
3 answers
6k views

How to resolve Spring @Value annotations in a web servlet?

I have a servlet packaged in an ear file, and I cannot get it to resolve @Value annotated properties. The app is in two parts: a servlet packaged in a war file, which is then included by different ...
Barney's user avatar
  • 2,816
0 votes
2 answers
7k views

Spring MVC : WARNING: No mapping found for HTTP request with URI [xxx] in DispatcherServlet with name 'yyy'

I am working on Spring MVC sample. when i use the / it works well. but when it comes to /xxx, it return WARNING. WARNING: No mapping found for HTTP request with URI [/SimpleSpringMVC/index] in ...
Juntian's user avatar
0 votes
1 answer
2k views

What is the best practise for invoking service method in spring controller?

I have created a spring-config.xml file.In that file I have created all beans for service class and DAO class.Now I want to call the bean in my Spring controller.The method I already know is ...
priya kar's user avatar
0 votes
0 answers
1k views

My Spring application could not load the Servlet Context

I am working on the Spring4.1.6 release. I have deployed my Webapplication named SpringMVCTest on Tomcat 7.0. I am getting the below exception on the Tomcat startup. Below are the Spring ...
Beast's user avatar
  • 629
0 votes
0 answers
1k views

applicationContext.xml is not loading when it is inside a jar file

I have maven module project with 4 modules core, web, config and war. I have all the spring configuration file inside config module /resources/spring/*.xml. When I am added the project in eclipse ...
Passionate developer's user avatar
1 vote
1 answer
660 views

How to configure different web application contexts for one servlet with different mapping

First of all I have have generic http servlet which I want to run in specific contexts depending on URL mapping (so I switched to HttpRequestHandler implementation). Please consider simplified example....
INeedMySpace's user avatar
0 votes
1 answer
572 views

MVC SPRING HTTP Status 500 - Servlet.init() for servlet mvc-dispatcher threw exception

I am learning Spring MVC and When i'm trying to run this simple index.jsp I'm getting these error. message error is about Servlet.init() for servlet mvc-dispatcher threw exception If it is possible ...
Ali Eslami's user avatar
0 votes
1 answer
83 views

ServletContext in Spring Application

I have one simple question. If web.xml web application descriptor like this. <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-...
Dani's user avatar
  • 4,111