Category "spring-mvc"

Thymeleaf doesn't print list of objects (Spring JPA)

I have 5 different object of class Tour with some fields.I want that my main page shows this object with their fields. I wrote conrtoller: @Controller

How to enable auditing for MongoDB via Annotations in Spring

I wanted to enable some auditing features, such as @CreatedDate. I am not using Spring xml configuration file, so I cannot add mongo:auditing to Spring configur

Spring RestController - findById and findByEmail request method not working (Ambiguous handler)

I want to retrieve user's info either based on the ID or the Email. Below is the controller class I wrote: @RestController @RequestMapping("/users") public clas

Converting MultipartFile to java.io.File without copying to local machine

I have a Java Spring MVC web application. From client, through AngularJS, I am uploading a file and posting it to Controller as webservice. In my Controller, I

Spring maven dependency issue

I have a problem that my pom.xml throw an error ArtifactTransferException: Failure to transfer org.springframework:spring-tx:jar:3.2.4.RELEASE from http:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException

Run my Spring Boot application (sample program to post jason to Spring RESTful webservice) in Eclipse successfully. However, when I use the mvn package command

automatically redirect to login page after session timeout - JSP, Spring

I can redirect a user to home page upon session logout.. this was very simple. However, if an user had logged into the app and had the page open, even on sessio

Get org.hibernate.LazyInitializationException in spring boot integration test

I'm trying to write integration test for Spring Boot application. I have Product and GalleryImage domain model. They are in one-to-many relationship. public cl

How does SecurityContextHolder.getContext().getAuthentication() work?

SecurityContextHolder.getContext().getAuthentication() obtains the currently authenticated principal, or an authentication request token, but in which context s

HTTP status 404 - Not Found while creating springBoot Application

This a springboot Application. It run perfectly but did not get output (it shows me HTTP Status 404 error in browser) pom.xml <project xmlns="http://maven.

Spring Boot response has already been committed exception for request to resources

I'm using Spring Boot (v1.2.4) deployed on WildFly 8.2 server. On the application I'm using font awesome v4.3. I get the "response already committed exception"

Mapping Ajax Request in Spring MVC: getting error 405 method not allowed

After making the ajax call I am getting error 405 method not allowed. I am using Spring 3.0.1, Spring-web 3.0.1. Here is the controller mapping @Controller p

Access Headers at any time when implementing org.springframework.validation.Validator

I have a Spring Boot Application where I need to perform some validation over the request's fields based on a header value. So like any other Spring Boot App m

How do I map Spring MVC controller to a uri with and without trailing slash?

I have a Spring Controller with several RequestMappings for different URIs. My servlet is "ui". The servlet's base URI only works with a trailing slash. I would

Spring MVC request and response flow explanation

I can't find correct client request flow in below syntax.Could someone please clarify what is happening here? Client(1) --> Dispatcher Servlet(2) --> Han

No suitable default RequestUpgradeStrategy found

I'm trying to use spring websocket for my application but when running the application on jetty i'm having an IllegalStateException. I found similar questions (

Could not exec java with Spring+Maven exit code 1

I am new to Spring/Maven, and am following this tutorial: Serving Web Content with Spring MVC. Everytime I run mvn spring-boot:run, I get this error: Fail

Getting an exception "Failed to start service jboss.module.service" for spring portlets

Thanks for your time the version we are using liferay 6 - jboss 7 and here is the error exception getting when trying to avoid the lib folder consisting sprin

SpringBoot Web MVC Application cannot resolve JSP views

I am trying to implement a web application using Springboot. but when I request methods I get 404 Error. Springboot cannot find Jsp files. this is my Controller

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