Questions tagged as 'spring-mvc'

1
answer

NullPointerException when calling method return in another class

I have the following method in the LoginController class @RequestMapping(value = "/usuarioEntidade", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST) public Resposta usuarioEntidade(@RequestBody EntidadesAdministr...
asked by 11.10.2017 / 18:31
1
answer

How to upload a Spring Boot project to a Glassfish or Tomcat server

I can run the application normally through the main class with 'tomcat embedded' as a dependency.     However when trying to run the application on some server the IDE itself Eclipse informs that the application can not be run on a server.     I...
asked by 07.10.2016 / 15:31
2
answers

JSP how to include a select inside a checkbox

I'm developing a web application with java spring mvc , and I need to list items in a dynamic checkboxList and include a select option on each item. Something that in html would be similar to the code below: <ul> <li>...
asked by 10.04.2016 / 17:10
1
answer

HTTP Status 400 - Bad Request - Spring MVC

When trying to call a Controller method it is returning the following error:    HTTP Status 400 - Bad Request Type Status Report       Description The server can not process the request due   something that is perceived to be a client error...
asked by 30.10.2018 / 20:43
1
answer

How to fix this and other errors: Failed to convert from type [java.lang.String] to type [java.lang.Long] for value 'list'?

I'm implementing an example of a book on Spring Boot , but after executing, when trying to access the /clientes/list or /clientes/view route in the browser the following errors appear:    Failed to convert value of type 'java.la...
asked by 14.10.2018 / 07:56
1
answer

Get value from an application.properties property - Spring Boot

I am a beginner in Spring Boot. I have a project in Spring Boot which has a application.properties and the inside has a property with a value ( spring.datasource.username=user ) and I want to get this value in a class java mine, I w...
asked by 04.10.2018 / 05:58
1
answer

SpringWebMVC - - Search Data with @ModelAtribute

Hello, I have the following method: @RequestMapping(value = "/pesquisa", method = RequestMethod.POST) public String pesquisa(@ModelAttribute("relSintetico") @Valid RelSintetico relSintetico, BindingResult bindingResult) { Timestamp dataIn...
asked by 31.08.2018 / 21:31
1
answer

Retrieve a property from a .properties file directly with thymeleaf

In a .properties file I have a property with the system version. Is there any way for Thymeleaf to retrieve this property directly? I want to use in the footer that is a fragment used on all pages.     
asked by 14.02.2018 / 20:59
1
answer

How do the Spring MVC ResponseEntity return on a new page?

I have a method of a report controller (posted below), to which I get a PDF. The problem is that it returns the pdf on the same application tab and this is killing it. How can I do to return in a new tab? Post method that is submitted in h...
asked by 05.02.2018 / 00:18
2
answers

Doubt Spring MVC Controller

I'm studying Spring MVC, and I'm developing a system that will contain questions and answers. How do I get the Controller, I create one for QuestionsController and one for AnswersController, or only 1 for the two     
asked by 16.05.2017 / 20:31