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
-
1
votes1
answer427
viewsHow to use th:if
Good morning, someone would tell me the correct way to use Thymeleaf’s "th:if" with Spring MVC, I’m trying this way but I’m not getting it .. th:if="${situacao_financeira} eq 'A'"…
spring-mvcasked 8 years, 1 month ago Diego Adriano 101 -
1
votes2
answers264
viewsSession Hibernate, how to obtain instance
In all the Hibernate documentation, and web-based examples have this code example, or a very similar one, to use Hibernate. List<Object> list = session.createCriteria(Object.class); Since…
-
1
votes2
answers1177
viewsSpring MVC + Spring Date Pagination
Good morning guys all ? I’m not having a problem in itself, just something I want to optimize. I’m using Spring MVC with Spring Data, to make the results pagination, I’m using Pageable inside my…
-
1
votes0
answers98
viewsModelling Object Change with Ajax
@GetMapping("/cadastrarProduto") public ModelAndView cadastrarProduto() { modelAndView = new ModelAndView("pages/index"); addObject("produtoEntity", new ProdutoEntity()); modelAndView; } It is…
-
1
votes1
answer1192
viewsBug on booting Tomcat
Good evening, everyone, I started to study the book of the code house, spring mvc, but right off the bat I made the following mistake when trying to start the cat tone, someone can help? jan 23,…
-
1
votes1
answer29
viewsSpring + Hibernate
Good morning! I’m studying Spring MVC, Maven and Hibernate. In the structure of the project created with Maven, where I put the file applicationContext.xml ? Thank you.
-
1
votes1
answer180
viewsBug in Spring with Hibernate query code
I have a problem, I am studying spring mvc with Hibernate and I ended up entering a bug where it returns the following exception "java.lang.Nullpointerexception", follows the codes:…
-
1
votes0
answers167
viewsHow does the Spring JSF integration work, and how does the Internalresourceviewresolver Filter participate, and how should it be configured for your integration?
I am studying to start a project of a distributed Web system, which will have simple interfaces in some contexts, but others will require an interface structure that will make it necessary to adopt…
-
1
votes1
answer223
viewsSpring MVC Security - Web config.xml does not open page
I am trying to implement Spring Security in my project, but I am facing the following problem. When I add tags to web xml., the project does not even load the initial page, already starts with error…
-
1
votes1
answer1033
viewsWhy is the HTTP Status 404 error occurring in my Jboss Tomcat 7 + Spring MVC application?
I’m running some tests on the MVC JBoss 7 + Spring, and locally it runs, but when I put it in the cloud, it generates the error HTTP Status 404. Organization of Briefcase:…
-
1
votes1
answer121
viewsReceive HTML Table in Controller (Springmvc)
Good morning, I have a page where the digital user 3 information. <input type="text" id="info01"> <input type="text" id="info01"> <input type="text" id="info01"> When typing the 3,…
-
1
votes1
answer505
viewsArchitecture API Restful
I’m building a Restful API with spring MVC and I have 2 non-functional requirements that I don’t understand how to attack them. The API must support 100 requests per second; The API should provide…
-
1
votes1
answer40
viewsSpring XML localization in a Maven project
Within a Maven project, where I put the Spring file, spring-context.xml?
-
1
votes0
answers139
viewsDynamically connect to the database by the Spring project’s Repository class
I need to connect to the database in a dynamic way, where the database connection data can be passed by parameter, below is an outline of how to need the connection and execution of the query. This…
-
1
votes1
answer1074
views2 files properties on Spring Boot
I am developing an API with Spring Boot, and I have 2 properties files for the development and production environments, How do I set the properties file of certain environment?
-
1
votes1
answer67
viewsHow to redirect request when @Preauthorize returns false
I’m learning about the Spring MVC and Spring Security. How do I redirect the page when the following line returns false within a @Controller ? @PostAuthorize(" hasRole('page')") If the line above…
-
1
votes0
answers122
viewsHow to include Prelude.jspf in java config spring boot
I am migrating a Spring MVC 3 application to Spring boot, this application had its web.xml with the Prelude.jspf configuration where it contained all the jsps JSTL Imports. I want to migrate this…
-
1
votes1
answer171
viewsError integrating Spring 4 + Hibernate 5 + JPA 2 and Glassfish
I’m unable to start the Spring transaction, it’s some configuration I made wrong who can help me. follow the codes: java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction()…
-
1
votes3
answers462
viewsHow to limit a user to only access their own data?
I am developing a task list application for study, however, all users access all tasks. I wonder if anyone has ever implemented something like this with the Spring Security and how you did.…
-
1
votes1
answer427
viewsProblems in configuring the Spring project
Create a controller called Homecontroller and put the following settings: First Configuration So far so good. After that you have to configure the project to see the page that is in this package:…
-
1
votes1
answer1666
viewsError message: Injection of autowired dependencies failed;
I can’t understand the error message; GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener…
spring-mvcasked 9 years, 1 month ago wladyband 4,694 -
1
votes0
answers47
viewsApplication Multi-tenancy Spring-mvc
Good evening guys, it’s been two weeks that I’m trying to develop a multi-tenancy application with spring mvc, but only think with spring boot, but without success. I wonder if anyone can help me. I…
-
1
votes0
answers42
viewsServlet configured with annotations not loaded
I have the following class: public class SpringServlet extends AbstractAnnotationConfigDispatcherServletInitializer{ @Override protected Class<?>[] getRootConfigClasses() { return new…
-
1
votes1
answer359
viewsVisitor counter using Spring Boot
I have a project of Mangas using Spring Boot with Angularjs and, I wanted to implement a counter of views, accesses, for each visualized manga. So I could classify the Manga in Category of most…
-
1
votes1
answer412
viewsSpring and Jasper - Browser does not understand streaming for download
I have an app that uses Jasper-Reports version 6.2.0 with spring-mvc version 3.2.14, java-ee-7, Tomcat 8 and at front-end we use Angularjs. The requisitions Rest are made via ajax. Spring…
-
1
votes1
answer528
viewsThymeleaf fragments are not inserted
Hello. I am trying to make a simple import of a code snippet via th:insert from Hymeleaf, but something is not going well. From what I read in the documentation, I don’t think there’s anything wrong…
-
1
votes0
answers81
viewsEmpty return webapp when searching for ID in the Mongo DB database (spring MVC+Thymeleaf)
Controller class where the ID search method is found: package br.com.apisw.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import…
-
1
votes1
answer3340
viewsMethod Difference with Getmapping and Requestmapping
Good morning guys. What’s the difference between the methods below and what should I be following in developing Java Web applications…
-
1
votes1
answer734
viewsSpring, Angular JS and Exception Handling in Service Layer
I have an app that uses Jasper-Reports version 6.2.0 with spring-mvc version 3.2.14, java-ee-7, Tomcat 8 and at front-end we use Angularjs. The requisitions Rest are made via ajax. The application…
-
1
votes1
answer63
viewsError Opening a Maven Project
Every time I try to import some Maven/Spring project gives me this error, some error in build 3.0.1. Does anyone know what might be? I am using a Macbook Pro (version 10.13.6 (17G65)) macOS High…
-
1
votes0
answers30
viewsHow to handle XML content using Spring MVC?
I need to query data in xml format using SOAP and write this data to the oracle database, how can I do this using Spring MVC?
-
1
votes0
answers8
viewsSpring MVC - Make JSP available
I have a simple Spring MVC application and the html pages are correctly display, altought, when i Try to use JSP pages, it does not work (error Displaying page like view file does not exist). I saw…
-
1
votes1
answer17
viewsType="datatime-local" does not take seconds
Soon the W3C went on to discontinue "datatime" and use "datatime-local", but I can’t take more seconds to make a specific report. Friends can help me?
-
1
votes1
answer1827
viewsGenerate PDF report with Jasper Reports and spring
Hello, I have a problem generating a report with Jasper Reports in spring. I did the implementation exactly as stated in method 4 of this explanation: https://stackoverflow.com/a/27532493 When I…
-
1
votes0
answers77
viewsSpring MVC - Error 405
I am trying to upload an application configured with Spring and is showing error 405. Controller: @Controller @RequestMapping(value = "/solicitacaoDeMaterial") public class…
spring-mvcasked 8 years, 9 months ago Augusto Martins 11 -
1
votes1
answer177
viewsMaven Spring MVC + JPA Project
I’m new to Spring MVC, created an example Maven project for Spring MVC using Hibernate and JPA. I found some problems when configuring persistence.xml but I could not use dartasource managed by…
-
1
votes0
answers26
viewsRedirecting to another sub-domain with added flash attributes (Redirectattributes) does not work
My question is related to adding attributes in the interface RedirectAttributes. I’m adding two attributes flash redirecting, but redirecting does not just change the URI, but the sub-domain as can…
-
1
votes0
answers46
viewsSpring MVC Neither Bindingresult nor Plain target Object for bean name 'contract'
I have a "list.jsp" page that renders the list of a certain entity. I was asked to create a search form within this page: <form:form role="form" commandName="contrato"…
-
1
votes0
answers318
viewsCrud with tables related in spring mvc
I’m developing an application java, using spring mvc. And in a functionality CRUD, I have an Incident Registration screen. On this screen, I have the fields mapped according to Incident.java.…
-
1
votes1
answer580
viewsHow to send an object between controllers via Redirect
How to send an Object through redirect between requests? I performed tests trying to send the object through the model, but without success. Follows the code: @RequestMapping("removeResultado")…
-
1
votes2
answers452
viewsHow to run a Timer class (always) on deployment?
I have a non-web project and I will turn it into a web project using Spring MVC. Today in my method static main of my main class, I create it here: Exec.principalTimer = new Timer();…
-
1
votes1
answer407
viewsCss not found html page - Springframework
Hello. I’m having trouble getting the css, js, fonts etc of my project on my pages. I am using Spring, typing the address of the css files in the browser but the system is not able to find the…
-
1
votes0
answers81
viewsHow to select a runtime class based on a Requestparam using Spring MVC?
Let’s say I have the following @Restcontroller in my code that uses Spring MVC: @RestController public class Exemplo { @RequestMapping(value = "exemplo", method = RequestMethod.GET) public…
-
1
votes1
answer584
viewsJson Post Unsupported Media Type Spring MVC
I’m performing a POST using ajax data format JSON for a controller in Spring MVC, but the server is refusing such a request Unsupported Media Type stating that the type is not supported. Have some…
-
1
votes1
answer1243
viewsError resolving template when running Spring application
I’m having trouble running this Spring application, I followed the steps of a booklet, but came up these errors below. How do I solve this problem? Mistakes: Error resolving template…
-
1
votes1
answer1978
viewsHow to upload a Spring Boot project to a Glassfish or Tomcat server
I can run the application normally by the main class with 'Tomcat Embedded' as dependency. However, when trying to run the application on some server the Eclipse IDE itself informs that the…
-
1
votes1
answer1247
viewsDeleting children records with @Manytoone annotation from Spring JPA
I have the classes Presente and Reserva, as below: @Entity public class Presente { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long codigo; private String nome; //getters e…
-
1
votes1
answer1746
viewsSend a list of objects to Spring using Thymeleaf
I have the following problem, I have an Entity called Teacher and another called Class, Teacher is with @Onetomany relationship for Class and when I try to save the classes marked in my checkbox in…
-
1
votes1
answer323
viewsPopular dropdown list with Spring MVC Controller database
I’m having trouble finding a way to popular a dropdown in the Controller and move on to the view. Because this way I’m doing when I enter the screen to update the dropdown does not return with the…
-
1
votes2
answers1607
viewsUsing Thymeleaf in Java Script code
Good evening friends, I had a javascript code extract using JSP tags that generated a pizza chart and works correctly. Now I need to migrate to Thymeleaf and I have no idea how to write the code.…