spring-mvc Questions
3
Solved
I'm adding an object to my ModelAndView in spring and forwarding to my jsp view. I need to access that object in my jquery. Is this possible without first putting the value in a hidden field? How i...
Paine asked 16/2, 2011 at 19:50
8
I have a single method that I want to allow both anonymous and authenticated access to.
I am using Spring Security 3.2.4 with Java based configuration.
The overridden configure method (in my custom...
Zebec asked 11/7, 2014 at 11:31
3
Trying to build a RESTful web service using Spring MVC.
The controller should return specific Java types, but the response body must be a generic envelope. How can this be done?
The following s...
Inappreciative asked 23/1, 2013 at 16:35
3
Solved
Spring Framework 5 apparently contains support for a "component index" which lives in META-INF/spring.components and can be used to avoid the need for class-path scanning, and thus, I assume, impro...
Scenarist asked 12/11, 2017 at 22:52
0
I have POST method in spring controller and I am trying to run test method on the controller using Test Rest template exchange.
Controller.java
@RequestMapping(path = "/rest/projects")
...
Macadamia asked 26/10, 2022 at 6:45
4
I am trying to build a basic MVC app using Spring boot with Hibernate as ORM and MySql as Database. The problem that I am facing is that the jsp views are not getting resolved.
I get a 404 error wh...
Foreclose asked 6/7, 2014 at 17:59
4
Solved
I am trying to create a request log for my web app. I am using Spring 3.
0.
I implemented a class extending HandlerInterceptorAdapter and used the preHandle(HttpServletRequest request, HttpServlet...
Luther asked 12/6, 2011 at 14:3
14
I have a set of Controllers in the application and a class annotated as @ControllerAdvice which sets up certain data elements that are used in each of these controllers. I'm using Spring MVC 3.2 an...
Piacular asked 8/3, 2013 at 19:57
4
There are 2 different features available:
servlet 3.0 allows to process request in a thread different from the container thread.
servlet 3.1 allows to read/write into socket without blocking read...
Nygaard asked 1/7, 2019 at 12:48
3
Solved
I have the following class:
public class MyDTO {
private String kiosk;
...
}
and following url:
http://localhost:1234/mvc/controllerUrl?kiosk=false
and following controller method:
@Requ...
Androw asked 5/5, 2015 at 12:59
3
Solved
I am using spring MVC. From my controller, I am calling jobLauncher and in jobLauncher I am passing job parameters like below and I'm using annotations to enable configuration as below:
@Configura...
Finzer asked 31/7, 2015 at 2:34
4
I am trying to use AOP to do some processing after an annotated controller. Everything is running with no errors, but the advice is not being executed.
Here is the controller code:
@Controller
p...
Faraday asked 22/7, 2010 at 14:46
2
Solved
<bean id="MyDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" v...
Quach asked 19/6, 2014 at 16:36
6
I think what I need is called reverse url resolution in Django. Lets say I have an AddUserController that goes something like this:
@Controller
@RequestMapping("/create-user")
public class AddUser...
Stanger asked 4/7, 2009 at 18:34
1
When I try to clone and run jHipster spring boot application using ./mvnw command, it getting an error mvnw: Permission denied. How can I solve it?
Superfluity asked 16/2, 2021 at 15:49
7
Solved
I have a freshly installed Tomcat 7 server, and I'm trying to make IntelliJ deploy a HelloWorld Spring MVC app to Tomcat.
My Tomcat home is /usr/share/tomcat7 and Tomcat base is /var/lib/tomcat7
...
Boarding asked 7/5, 2013 at 20:36
4
Solved
I am trying to change spring xml settings to pure code based setting.
So I read official documents and some posts from blogs.
e.g. http://docs.spring.io/spring-framework/docs/4.1.x/javadoc-api/or...
Pharmaceutics asked 14/5, 2015 at 2:38
10
Solved
What is the right way to add HttpRequest interceptors in spring boot application? What I want to do is log requests and responses for every http request.
Spring boot documentation does not cover t...
Saintsimon asked 26/6, 2015 at 22:19
5
Solved
I have configured a RepositoryRestResource on a PageAndSortingRepository that accesses an Entity that includes a composite Id:
@Entity
@IdClass(CustomerId.class)
public class Customer {
@Id BigIn...
Illconditioned asked 22/5, 2014 at 8:29
5
Solved
I am using Spring Security with SpringMVC to create a web application (I will refer to this as the WebApp for clarity) that speaks to an existing application (I will refer to this as BackendApp).
...
Eccrinology asked 5/8, 2015 at 7:38
2
Solved
I have a REST Component in Spring. Simplified, it looks like this:
@RequestMapping(value = "/route", method = RequestMethod.GET)
public Object thisIsTheMethod(@RequestParam(value = "value", requir...
Photophilous asked 5/5, 2016 at 19:22
4
Solved
I use the following custom editor in MANY Spring-MVC controllers according to:
A controller
binder.registerCustomEditor(BigDecimal.class, new CustomNumberEditor(BigDecimal.class, NumberFormat.get...
Estonian asked 12/8, 2009 at 18:51
1
I have gone through the 5.5 Bean Scopes section in Spring, I would like to know some practical examples where we use the scopes for request, session and application scoped beans.
I have gone throu...
Article asked 20/5, 2015 at 18:46
5
I'm getting error while uploading excel file size is more the 1MB.
[org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request;
nested exception is java.lang....
Hubby asked 23/3, 2019 at 8:43
9
I want to send an object to the controller that has several lists with files and several fields with plain text.
public class ContributionNew<T extends MovieInfoDTO> {
private List<T>...
Protohuman asked 1/1, 2018 at 16:7
© 2022 - 2024 — McMap. All rights reserved.