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

389 questions
0
votes
1 answer

Difference between org/springframework/web/servlet/ModelAndView class and org/springframework/web/portlet/ModelAndView

I have just answered the below question which revolves around this posted question. spring mvc InternalResourceViewResolver doesnt get prefix Can someone out there tell the difference between the classes org/springframework/web/servlet/ModelAndView…
Kalyan Chavali
  • 1,220
  • 7
  • 24
0
votes
0 answers

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

I am using spring-4.0.1.RELEASE, spring-oauth-security-2.0.7.RELEASE. I already cleaned, installed, compiled the project but did not made any difference.
Shamim Ahmad
  • 759
  • 1
  • 14
  • 35
0
votes
2 answers

c3p0 DataSource monitor deadlock - all threads hang - how to fix

We have a Spring based application and recently we went into production. We are using Spring @Controller that ultimately hit DAOs that use JDBCTemplate. It is using c3p0's ComboPooledDataSource On an increased load (something like 150 concurrent…
Martin Asenov
  • 1,227
  • 2
  • 16
  • 37
0
votes
0 answers

SubProtocolWebSocketHandler - No handlers

I have this ugly error during deploying Spring app on JBoss. 18:11:16,025 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/consumer]] (MSC service thread 1-7) Exception sending context initialized event to listener…
Lukasz Ciesluk
  • 698
  • 1
  • 16
  • 29
0
votes
2 answers

Spring boot web starter cannot find jsp

The file structure: app -build.gradle -src/ -main/ -java {source code} -resources -application.properties -webapp -WEB-INF -jsp -index.jsp Here is the core code…
darklord
  • 4,567
  • 8
  • 34
  • 53
0
votes
1 answer

Adding authentication to outbound http requests

I have a rest web service that is implemented using spring boot starter web. This service acts as a client to another application that requires authentication to make calls to it. Calls made from the client to the server are using…
0
votes
1 answer

AbstractAnnotationConfigDispatcherServletInitializer

I want to know the purpose of below methods inside the class when the class extends AbstractAnnotationConfigDispatcherServletInitializer protected Class[] getRootConfigClasses() { return new Class[0]; } @Override protected Class[]…
-1
votes
1 answer

When I save I get this exception in Java Spring

I have this exception in my code. I am new to Java. Below I mention my code. I need to know why this happens even if I gave value to name parameter. I changed my parameter several times but it gives me same exception. I use Springframework 4.3.7…
tharinda
  • 9
  • 6
-1
votes
1 answer

Spring controller cannot read image file from multipart/form-data post request

I am trying to upload a form that has both text fields and an image using multipart/form-data as the content type. When i do the post from my angular application i can clearly see in the console that the content-type is correct and that the request…
Maurice
  • 4,056
  • 5
  • 30
  • 66
-1
votes
1 answer

How to allow POST both list or map as JSON in spring controller?

I have a @PostMapping that allows the user to send a plain json map, like: { "firstname": "john", "lastname": "doh" } Servlet: @RestController public class PersonController { @PostMapping("/generic") public void post(Map
membersound
  • 66,525
  • 139
  • 452
  • 886
-1
votes
1 answer

java.net.SocketTimeoutException: Read timed out WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:561)

I am getting below exception while calling a SOAP service using WebserviceTemplate. I am using a proxy to connect to the endpoint url. Below is my XML configuration:
rupesh
  • 333
  • 6
  • 18
-1
votes
1 answer

what's wrong with my simple Spring web service?

I built a simple Spring Web application. I have this simple @Controller with an @RequestMapping, but when I run it I can't hit the URL: http://localhost:8080/labutil/all What am I doing wrong? package com.mycompany.ion.labutil.controller; import…
user550738
-1
votes
1 answer

Why aren't my callback methods working properly?

I use AsyncRestTemplate to make resttemplate asynchronously. These methods should wait all asyncresttemplate processes till done, And It will return reviewContent. Problem is callback methods are not working, before the entire method works done. So…
-1
votes
2 answers

In which layer i should check if (something) exists?

Suppose i have User entity. I want to check if user id exists on database. I know how to check, but in which layer ? What is the best and more understandable layer for that ? In my opinion, it should be Controller layer. But i don't think it is…
1 2 3
25
26