tagged [spring-mvc]

Loading context in Spring using web.xml

Loading context in Spring using web.xml Is there a way that a context can be loaded using web.xml in a Spring MVC application?

26 Sep at 12:49

What's the difference between <mvc:annotation-driven /> and <context:annotation-config /> in servlet?

What's the difference between and in servlet? I am migrating from Spring 2.5 to Spring 3. They have introduced `` which does some black magic. This is expected to be declared in servlet configuration ...

6 Dec at 17:33

How do I use Spring Boot to serve static content located in Dropbox folder?

How do I use Spring Boot to serve static content located in Dropbox folder? I have a Spring Boot web application, and I would like to serve static content located in a shared Dropbox directory on my L...

Spring get current ApplicationContext

Spring get current ApplicationContext I am using Spring MVC for my web application. My beans are written in "`spring-servlet.xml`" file Now I have a class `MyClass` and i want to access this class usi...

17 Feb at 11:14

Spring: How to get parameters from POST body?

Spring: How to get parameters from POST body? Web-service using spring in which I have to get the params from the body of my post request? The content of the body is like:-

4 Mar at 05:11

How do you create a Spring MVC project in Eclipse?

How do you create a Spring MVC project in Eclipse? I am trying to follow the basic tutorial for Spring MVC but got lost at creating a new project in Eclipse. It seems to me that most tutorials assume ...

How to extract IP Address in Spring MVC Controller get call?

How to extract IP Address in Spring MVC Controller get call? I am working on Spring MVC controller project in which I am making a GET URL call from the browser - Below is the url by which I am making ...

6 Apr at 08:6

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener I am trying to implement the spring security log in and I have tried som...

5 May at 07:7

How to convert a multipart file to File?

How to convert a multipart file to File? Can any one tell me what is a the best way to convert a multipart file (org.springframework.web.multipart.MultipartFile) to File (java.io.File) ? In my spring ...

Serving static web resources in Spring Boot & Spring Security application

Serving static web resources in Spring Boot & Spring Security application I am trying to develop Spring Boot web application and securing it using Spring security java configuration. After placing my ...

No default constructor found; nested exception is java.lang.NoSuchMethodException with Spring MVC?

No default constructor found; nested exception is java.lang.NoSuchMethodException with Spring MVC? I am working with Spring MVC controller project. Below is my Controller and I have a constructor decl...

Multipart File upload Spring Boot

Multipart File upload Spring Boot Im using Spring Boot and want to use a Controller to receive a multipart file upload. When sending the file I keep getting the response and the controller is never re...

Handle spring security authentication exceptions with @ExceptionHandler

Handle spring security authentication exceptions with @ExceptionHandler I'm using Spring MVC's `@ControllerAdvice` and `@ExceptionHandler` to handle all the exception of a REST Api. It works fine for ...

16 Oct at 04:3

When use ResponseEntity<T> and @RestController for Spring RESTful applications

When use ResponseEntity and @RestController for Spring RESTful applications I am working with Spring Framework 4.0.7, together with MVC and Rest I can work in peace with: - `@Controller`- `ResponseEnt...

24 Oct at 13:56

Multiple scenarios @RequestMapping produces JSON/XML together with Accept or ResponseEntity

Multiple scenarios @RequestMapping produces JSON/XML together with Accept or ResponseEntity I am working with Spring 4.0.7 About Spring MVC, for research purposes, I have the following: ``` @RequestMa...

Multipart File Upload Using Spring Rest Template + Spring Web MVC

Multipart File Upload Using Spring Rest Template + Spring Web MVC I am trying to upload a File using RestTemplate with the following code. ``` MultiValueMap multipartMap = new LinkedMultiValueMap(); ...

17 Nov at 02:39

My Application Could not open ServletContext resource

My Application Could not open ServletContext resource i have web project where i use and . When i truy to launch it, it doesn't suceed to intialize the context: `Could not open ServletContext resource...

Sun JSTL taglib declaration fails with "Can not find the tag library descriptor"

Sun JSTL taglib declaration fails with "Can not find the tag library descriptor" I am using a JSP page to print an array of values. I'm trying to use JSTL `` for this. The problem is my JSTL taglib de...

5 Jan at 21:26

Spring MVC: difference between <context:component-scan> and <annotation-driven /> tags?

Spring MVC: difference between and tags? Some days ago I began to study this Spring Hello World Tutorial: [http://viralpatel.net/blogs/spring-3-mvc-create-hello-world-application-spring-3-mvc/](http:/...

14 Jan at 05:19

No mapping found for HTTP request with URI.... in DispatcherServlet with name

No mapping found for HTTP request with URI.... in DispatcherServlet with name I checked out nearly every relevant article on stackoverflow already, but I just cant fix my problem. Here is the code: we...

10 Feb at 10:50

Spring Boot Program cannot find main class

Spring Boot Program cannot find main class I have a program which runs as a Spring boot App in eclipse. The program was running fine. Then i did the following: Right click on project -> Run As -> Mave...

11 Feb at 09:47

Error creating bean with name 'springSecurityFilterChain'

Error creating bean with name 'springSecurityFilterChain' I have been following the [Spring Security Reference](http://docs.spring.io/spring-security/site/docs/3.2.5.RELEASE/reference/htmlsingle/) and...

Trying to use Spring Boot REST to Read JSON String from POST

Trying to use Spring Boot REST to Read JSON String from POST Am using the latest version of Spring Boot to read in a sample JSON via Restful Web Service... Here's my pom.xml: ```

28 Mar at 04:31

Basic Spring MVC config: PageNotFound using InternalResourceViewResolver

Basic Spring MVC config: PageNotFound using InternalResourceViewResolver I'm trying to get a first Spring 3 MVC setup running. My app is running on tomcat, with in the server context of "grapevine" Fo...

23 Apr at 12:3

JSON character encoding

JSON character encoding My Java web application submits an AJAX request that returns JSON such: When 'aériennes' is displayed in the webpage, it appears as 'a�riennes', so I guess there's some kind of...