Questions tagged [spring-web]

The Spring Web model-view-controller (MVC) framework.

The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, time zone and theme resolution as well as support for uploading files. The default handler is based on the @Controller and @RequestMapping annotations, offering a wide range of flexible handling methods. With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features.

Official Documentation

386 questions
0
votes
1 answer

How can i set custom response phrase using Spring framework?

I am working on developing RESTful service on Java using Spring framework. If exception occurs in my services layer i throw an exception bound to Http status code. For example when user's authentication fails i send response with 401 status…
Kirill
  • 6,762
  • 4
  • 51
  • 81
0
votes
0 answers

Spring boot serving a spring web mvc application with tomcat in a java webstart application

I managed to get this running but I'm facing a lot of problems that only occur when the application is running with java web start. When I run it from within my IDE it runs fine. Static content that should be served out of the box from within a…
Bart
  • 11
  • 1
  • 2
0
votes
1 answer

How to fix Spring DispatcherServlet class not found?

I start to study Spring so I trying to create some simple application using Spring MVC. I saw a lot of propositions how to fix this error, but still didn't solve it. Please if somebody know something, can you help? because I have spent already a lot…
Nickolas
  • 192
  • 7
  • 20
0
votes
1 answer

How to resolve "cyclic loading of class path resource"?

I have two separate projects. One is maven, spring webservices(Let's say this is project A) and the other is maven batch project(Let's call it B). I am trying to inject a class(let's say class "batch.java") from B into a class(let's call it…
Kiti_123
  • 15
  • 1
  • 6
0
votes
1 answer

Angular: can't download server side generated spreadsheet

I'm trying to download a server generated spreadsheet. My application uses Angular on the front-end and Java on the back-end. Here's the method on the back-end that receives the request to generate and return the file: @RequestMapping(value =…
Marcos Tanaka
  • 3,112
  • 3
  • 25
  • 41
0
votes
2 answers

Spring-web tries to find resource named with informed path variable

Using spring-web, I am mapping a method to receive a request containing dots "." on the path: @RequestMapping(value = "download/{id:.+}", method = RequestMethod.GET, produces = "application/xls") public String download(@PathVariable(value = "id")…
Marcos Tanaka
  • 3,112
  • 3
  • 25
  • 41
0
votes
1 answer

Maven + Spring web project not hitting controller

[enter image description here][1][enter image description here][1]I am trying to create Maven + Spring web demo project. For this I created an index.jsp from where I am trying to hit controller with value as my name. But After running application…
Gourab Banerjee
  • 59
  • 1
  • 1
  • 9
0
votes
1 answer

How to specify url-pattern for Servlet filters in WebApplicationInitializer?

I am converting a web.xml file to Java based configuration using Spring-web's WebApplicationInitializer. Following is the sample filter defined sampleFilter
sidgate
  • 14,650
  • 11
  • 68
  • 119
0
votes
1 answer

Spring migration from 3.x to 4.2.3 - issue

we almost done with migration of spring project from 3.2.2.Release to 4.2.3.Release successfully, but once we started testing we are facing below issue at multiple places in our application, i guess this some conflict i spent one day i didn't get…
0
votes
1 answer

Spring integration in Rest API module

I have a rest API module developed using apache cxf. I want to have spring integration component to be run in the same module. This feature simply do a file polling every midnight, copies to some directories, and do some processing. I just need to…
TV Nath
  • 499
  • 5
  • 12
  • 35
0
votes
1 answer

spring async rest client orchestrate few calls

I have following problem in my service I am building object X however In order to build it I need to make few http calls in order to get all required data to fill it (each rest fills certain part of the object.) In order to keep performance high I…
John
  • 1,350
  • 5
  • 27
  • 49
0
votes
0 answers

401 on GET with Spring RestTemplate

I'm writing a client for REST API using cookie-based authentication. Here's the code: HttpHeaders headers = new HttpHeaders(); headers.add("Cookie", auth_cookie); HttpEntity request = new HttpEntity<>(headers); ResponseEntity response =…
dll
  • 1
0
votes
0 answers

UnsatisfiedDependencyException When injecting a Spring Component into Jersey 2.22.1

Technologies used: Spring Boot 4.2.4-RELEASE Jersey 2.x (spring boot starter version) Deployed on Weblogic 12.1.3 I'm experiencing a org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee…
0
votes
1 answer

spring boot not working

I am new to spring boot. I have a sample of it. pom.xml
reza ramezani matin
  • 1,384
  • 2
  • 18
  • 41
0
votes
0 answers

Spring get HttpMessageConverter for current request body

I know how to get all the registered message converters, but is there a way to get the HttpMessageConverter for the request body of the current request, either in HandlerMethodArgumentResolver, RequestBodyAdviceAdapter or in the controller itself?…
Jaap van Hengstum
  • 4,494
  • 4
  • 30
  • 34