Category "spring-mvc"

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

400 Bad Request - while POSTing JSON data to RESTful controller implemented with Spring MVC

I am trying to POST some JSON data to RESTful spring controller. But getting "400 Bad Request" as response status. Giving below code from the key configuration

@EventListener for AuthenticationSuccessEvent or InteractiveAuthenticationSuccessEvent not fired

I have this listener in the context of Spring: package listeners; import java.util.Date; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.s

Ignore fields from Java object dynamically while sending as JSON from Spring MVC

I have model class like this, for hibernate @Entity @Table(name = "user", catalog = "userdb") @JsonIgnoreProperties(ignoreUnknown = true) public class User imp

Hibernate : Why is it trying to drop/create database on startup?

I'm new with Spring. I finally succeeded to build my application with no error but when i'm looking to the output i have a lot of information that i don't under

How can I make Spring WebServices log all SOAP requests?

I need all SOAP requests logged in the CommonLogFormat (see http://en.wikipedia.org/wiki/Common_Log_Format), plus the duration (the amount of time it takes to p

exception sending context initialized event to listener instance of class

I have this class: public class DatabaseHelper { @Autowired static UtilService utilService; public static void fillEmptyTables(){ if(!isSk

exception sending context initialized event to listener instance of class

I have this class: public class DatabaseHelper { @Autowired static UtilService utilService; public static void fillEmptyTables(){ if(!isSk

what is the default page for spring-mvc application

IF i have this line in web.xml then i know which is landing page <welcome-file-list> <welcome-file>redirect.jsp</welcome-file> </welcome