Questions tagged as 'spring-mvc'

1
answer

I can not access static content in spring-mvc

How do I access the static content of spring-mvc? For example a css. I have the following spring setting: import java.util.Properties; import javax.sql.DataSource; import org.hibernate.ejb.HibernatePersistence; import org.springframework....
asked by 26.06.2016 / 21:23
1
answer

How do I use Page in this query instead of List?

@Query(value="SELECT * FROM prot_protocolo where status = 'PENDENTE' AND departamento_id=?", nativeQuery=true) public List<Protocolo> findByProtocolosPorDepartamento(String id); The page does not accept nativeQuery, of the error when...
asked by 24.10.2016 / 15:45
3
answers

Do not parse the bootstrap datepicker for dd / mm / yyyy - 400 Bad Request (POST)

I have a web application, basically pure wheel with JSP + AngularJS. The template I use from the bootstrap, did not have datepicker with AngularJS, so I'm using it with jQuery. I have on my screen, a modal with several fields, I could al...
asked by 07.01.2016 / 17:49
2
answers

How to display on a JSP page the attributes of an object that was passed in a list

I'm working on a Java Web project, using the Spring MVC framework. I'm having trouble displaying information that comes from a list where analysts are registered. The analyst name is displayed correctly, since name is a String attribute of...
asked by 04.08.2015 / 19:49
1
answer

Interceptor in Spring MVC

I made an interceptor so that every time the system had a message to display I would trigger a javascript with the message. public class MessagesInterceptor extends HandlerInterceptorAdapter { public static final String urlBase = "http://...
asked by 21.01.2015 / 00:53
1
answer

Message "301 Moved Permanently" began to appear suddenly

I have two applications that worked perfectly, but without any changes to the code, they do not work anymore. On the one hand, an application with a JSP doing a POST call and passing two hidden parameters: <li> <form name="logi...
asked by 24.06.2014 / 23:40
2
answers

Problem passing Polled Bean to controller and insert into DB using Java with Spring mvc

I would like you to help me with this problem that is occurring in my application. The following is the code below: package br.com.estoque.Controller; import java.util.Map; import org.springframework.stereotype.Controller; import org...
asked by 17.09.2014 / 04:16
1
answer

You are not creating with "persist"

SEVERE: Servlet.service() for servlet [Spring MVC Dispatcher Servlet] in context with path [/cq] threw exception [Request processing failed; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transact...
asked by 01.06.2018 / 22:46
2
answers

Problems trying to save data coming from form

I can not get the HTML page to enter the name and save. Could someone explain what is happening? @Entity public class Livro { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String nome; @Many...
asked by 29.04.2017 / 15:30
1
answer

Problem in persistence of data using JPA

I have a class that has two attributes, start time and end time, both of type Date. @Temporal(TemporalType.TIME) private Date horarioInicio; @Temporal(TemporalType.TIME) private Date horarioFinal; In the view layer the Spring Data Binding f...
asked by 10.06.2017 / 20:30