Most voted "spring-mvc" questions
Based on the Model-View-Controller (MVC) standard, Spring MVC helps build web-based applications that are flexible and decoupled from underlying technologies view.
Learn more…291 questions
Sort by count of
-
13
votes2
answers791
viewsApprove or refuse a request through Handlerinterceptoradapter
It is known that all requisitions by @RequestMapping are "public", where any user can access them through the browser. The question is, how to approve Requests where only the system can request and…
-
11
votes3
answers238
viewsPrevent an action from being intercepted by the Interceptor Handle
I implemented a class to intercept some urls and check if I have a logged-in user in the session, if yes access url, otherwise I am automatically "played" to the login screen. It happens that on a…
-
10
votes2
answers1330
viewsURL Forwarding With Spring MVC
I want to put in my project access a page in a subdirectory of views. Type views/pessoa/criar.jsp. How can I write a controller who goes to this page? I’m using Spring MVC 3 and…
-
8
votes2
answers226
viewsWhy does Value in Spring MVC need an asterisk?
Why do I need to put * no value when there is nothing else? I mean, before using Spring MVC worked smoothly only as /planilha/. The getPlanilha works properly but if it has the same RequestMethod…
-
7
votes1
answer971
viewsController and service annotations
In Spring 3 there are class annotations @Component, @Service, @Controller and @Repository. I know that the @Component is the only one that can be used in all cases (Controller, Service and…
-
7
votes1
answer1440
viewsWhat is Spring MVC?
I am developing a web java project and am using the MVC (Model-view-controller),which is a standard software architecture (Pattern design) and know that its function is to separate the…
-
7
votes1
answer297
viewsMulti Tenancy with Hibernate update schema
Hello I am with an application that uses multiple databases (multi-tenancy) using Hibernate. I wonder if anyone knows any way Hibernate can update the bank schema. I’ve already set the property…
-
7
votes2
answers1757
viewsHow to receive a List (Java) in Javascript, using Spring MVC?
I have a web application using the Spring MVC framework. I need to receive a List in a Javascript function, but I don’t know the best way to do this, without getting the code confused. The Processes…
-
7
votes1
answer99
viewsPersistent Hibernate Resource Return
Good afternoon. I would like to understand how to resolve the following issue: In the project I’m working on, Backend and Frontend are separated. To persist the data I am using Hibernate and to…
-
6
votes2
answers1225
viewsMaven + Spring MVC + JSP project, how to share view files?
I’m trying to adjust a file structure to start a big project, an ERP to be more exact. Today, there is a good part of it made in PHP in a disorderly way. Let’s adopt Java Web (Maven + Spring MVC +…
-
6
votes1
answer323
viewsJPA, Hibernate, Spring MVC, Maven - Definition
I’m having a lot of questions about definitions! My goal is to build a system architecture, but the definitions of JPA, HIBERNATE, SPRING MVC, MAVEN, are obscure. JPA: It is nothing more than a…
-
6
votes1
answer387
viewsSpring MVC and turnstile integration
I’m developing a system for my university’s college restaurant with Spring MVC. I need to connect the system to a Topdata brand turnstile, which controls customer access to the restaurant. Since I…
-
6
votes1
answer250
viewsHow to unify two Csss files
I’m doing a project Spring MVC 4.2. In this project I have more than one file CSS and more than one JS. What I want is to transform all the files Csss in a single ALL.css and that this file is…
-
5
votes1
answer612
viewsIn Spring MVC, how to send information to the view (.jsp) without using Modelandview?
I am developing a web application in Spring MVC. I have a method that returns a list (java.util.List) and I need to pass it to the view (.jsp), but without updating the page. I would like to know…
-
5
votes1
answer248
viewsjava.lang.Illegalstateexception when declaring aspect with Spring
I’m trying to state this aspect: @Aspect @Component public class UpperCaseAdvice { @Before("@target(annotations.Model)") public void toUpperCase(JoinPoint joinPoint){ //faz alguma coisa } } I am…
-
5
votes1
answer711
viewsConvert String Ex. 1.520.30 to Bigdecimal using Spring MVC @Initbinder
I have a canvas on which I work with the monetary value masks of jQuery Mask, when the user performs the Submit of form the value returned to my controller is Ex:. 1.340,34. The attribute in my Bean…
-
5
votes1
answer246
viewsSpring MVC getJdbcTemplate Insert in Oracle return column value
I have a project in Spring MVC, I’m using the getJdbcTemplate to make Insert’s. Only I do not insert the key Primary in Oracle from a sequence and need that value to re-enter another table where…
-
5
votes1
answer423
viewsRedirect jsp page using Springframework
Hello! I have the following problem in redirecting the index.jsp page to the.jsp login page, in Tomcat it only appears that this page was not found, ERROR 404. If anyone can help, I’m using and…
-
5
votes1
answer396
viewsHow to expose a bean method to use spring dependency injection
I need to expose a method like a bean on ApplicationContext of Spring to use it in the injection of an attribute, which has more than one implementation. What I did was the following: I added the…
-
4
votes2
answers6465
viewsHow to return a list as JSON using Spring MVC (@Restcontroller)?
I want to return a list in JSON format using Spring, but I am not succeeding. At pom.xml I added this dependency: <dependency> <groupId>org.codehaus.jackson</groupId>…
-
4
votes2
answers643
viewsHow to send an error message to view
I am a little lost here, I would like to put a parameter in the view to inform the user that his password is wrong, expired etc. the problem that spring-security identifies.…
-
4
votes3
answers2718
viewsWhat is the correct way to pass the pagination data in Sponse REST?
In more robust applications, where a table can have millions of records, it is important to implement paging in a REST API. I have seen in some projects two ways to return pagination information…
-
3
votes1
answer856
viewsSpring MVC in HTML pages without JSP
1 - You can use data sent by Spring Controllers in HTML pages (using HTML5 tags), not to use JSP? 2 - If not possible, how can I make JSP pages with Spring MVC with minimal Java code intrusion on…
-
3
votes1
answer115
viewsBinding on Spring MVC not working
Well, I have a problem that never occurred to me before related to the Spring MVC Binding. I have a form as below. The bindind "firstName" and "lastname" work well, but already the "logins.email"…
-
3
votes1
answer100
viewsMethod not found using JPA
I created a method for autocomplete. However when I invoke this method it is not found, follow below error: Advertência: /pessoal/cadastrar.xhtml @35,186…
-
3
votes1
answer188
viewsFailed to use Spring MVC and Jparepository search field
Good afternoon. I’m working on Repository and Spring MVC. I have an interface, Storedao that looks like this. public interface StoreOrderDAO extends JpaRepository<StoreOrder, String>{…
-
3
votes1
answer672
viewsHow to check if my spring application is in production environment?
when it is in production I want that when it falls into an exception send an email to the support but only in production , in development I do not want it to perform this task .
java spring spring-mvc spring-security spring-bootasked 9 years, 3 months ago Jose Vieira Neto 2,560 -
3
votes2
answers168
viewsPass username to Rigger de historico
I’m trying to implement a Trigger generic for registration history. I am following this link Audit Trigger that works perfectly. The only problem is that I can’t pass the user who is making the…
spring-mvcasked 10 years, 3 months ago Vander 51 -
3
votes2
answers1762
viewsPass JSP model to Springmvc controller
Could someone please explain to me how to correct my JSP error? This form will serve to register products in my system, it receives a list of product categories from the database. My Product…
-
3
votes1
answer171
viewsIs it possible to send all Java Exceptions by email?
I have a Java Web application, using Spring MVC, and would like to email all Exceptions released on the system. Is it possible to do that? Set up a default email to receive all Exceptions and…
-
3
votes1
answer427
viewsProblem with Spring MVC + javascript
I have a problem related to Spring MVC and javascript/Jquery. Well I have a jsp with a form and I needed to do a test where when clicking a button jquery clears the text of some "input type='Text'".…
-
3
votes2
answers366
viewsConvert Spring XML declaration to Java code
Can someone help me convert the Spring XML code that is just below into a Java code? <bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine"> <property…
-
3
votes1
answer159
viewsRelating entity to more than one entity
Hello, I have in my system the following entities Customer, Supplier and Financial. They all have a list of Contacts, as a bi-directional relationship would look in these molds. public class Client…
-
3
votes1
answer824
viewsSpringboot and Angularjs routes
I am trying to put url friendly to take the '#' of the angle url, I followed the following tutorial: /spring-boot-as-a-backend-for-Angularjs/ and it worked in the statistical url. But if I do this…
-
3
votes1
answer100
viewsSpring MVC error in performing Binding of checkboxes on a list of objects
I have the following piece of code in my .jsp, in which the objective is to dynamically list a passenger list per customer. <f:form id="service-item-form" action="${action}"…
-
3
votes1
answer379
viewsHow to mount a link in JSP with the value of an input?
You can mount a link(href) or action(form) by taking the value of an input to pass to a @Pathvariable of a method in the controller? My code is next in the controller:…
-
3
votes2
answers377
viewsDoubt regarding the management of JPA with Spring in JEE server
I’m starting in Spring MVC and in the book I’m reading the configuration and management of connections is all done by Spring, IE, Spring opens and manages connections with the bank and makes it…
-
3
votes1
answer222
viewsHow to handle multiple inputs with the same name in Java?
How do I manipulate in the back-end using multiple Java input's with the same name? For example: <input type='text' name='telefone' ><br> <input type='text' name='telefone'…
-
3
votes1
answer88
viewsError returning Hashmap to Javascript
When returning the hashmap to javascript I got the following error: The Resource identified by this request is only capable of generating Sponses with Characteristics not acceptable According to the…
-
3
votes3
answers1826
viewsObject search/registration via REST url and registration with SPRING
I’m new to REST and Spring. I am doing an exercise where I have to search a client via url and return (GET) it in JSON format and insert(POST) a client in JSON format. To search for sera in the…
-
3
votes1
answer1474
viewsJava Spring Boot - Read a file from the Resources folder inside a . jar
I am writing a class that will read an ETL Pentaho Kettle (transformation). I have put the file that the class will read in the Resources / KTR folder. But when I try to run the code as a java…
-
3
votes1
answer61
viewsSpring Model 4.3.1
I don’t know how to work 100% with #POST and #GET yet, my problem must be in understanding how requests occur and when my objects are instantiated. Follow methods: CaixaOperacaoController.java…
-
3
votes2
answers57
viewsPage displaying error
I am beginner in spring with java and have the following controller and jsp Controller: @Controller //mapeamento do nome @RequestMapping("/hello") public class HelloController { //mapeamento do nome…
-
2
votes2
answers1115
viewsStatic jsp content is not shown
I’m using netbeans 7.3.1, apparently it’s working ok. Pages are opening normally, but when I try to access css content, jpg, ... within the Resources folder, no content appears. In the file…
-
2
votes1
answer109
viewsChange Active Profiles Spring at runtime
I usually use this code snippet to define the profile of the application <servlet> <servlet-name>dispatcher</servlet-name>…
-
2
votes1
answer1097
viewsHibernate: Error while trying to persist field that maps foreign key
In my current Spring project, I am facing the following problems when trying to save one entity that refers to another (with foreign key), with this: @Entity @Table(name="pagina") public class…
-
2
votes1
answer1864
viewsMessage "301 Moved Permanently" began to appear suddenly
I have two applications that worked perfectly, however, without changes in the code, no longer work. On one side, an application with a JSP making a call POST and passing two parameters Hidden:…
-
2
votes2
answers407
viewsHow to use Mysql view’s with Spring Data and eclipselink
In the development of my project I came across a select that will require a lot of application performance, as it consists of using two Join’s. Soon came to mind the creation of a view in Mysql, but…
-
2
votes2
answers865
viewsI can’t save to the database in a Spring MVC project
I will explain the project because I believe that most people usually create projects using XML, and I created the Spring MVC project by dispensing the files that configure the project as XML. The…
-
2
votes1
answer5362
viewsWhat is the purpose of the @Transactional(readonly = false) annotation?
Annotation used for service injection in the Spring Framework.