To use request scope without Spring MVC, you should declare RequestContextListener
in web.xml (see 3.5.4.1. Initial web configuration):
<web-app>
...
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
...
</web-app>
More Related Contents:
- Avoid Jackson serialization on non fetched lazy objects
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- How can I log SQL statements in Spring Boot?
- Spring Boot – Handle to Hibernate SessionFactory
- @Transactional method called from another method doesn’t obtain a transaction
- No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor
- Error : java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
- Hibernate table not mapped error in HQL query
- What is the ‘best’ way to do distributed transactions across multiple databases using Spring and Hibernate
- Need to reset the value of sequence in Oracle
- How can I set the welcome page to a struts action?
- mapping Hibernate query results to custom class?
- Spring 3.1 Hibernate 4 exception for Inheritance [cannot be cast to org.hibernate.mapping.RootClass]
- Java SE + Spring Data + Hibernate
- When are connections returned to the connection pool with Spring JPA (Hibernate) Entity Manager?
- Spring hibernate template when to use and why?
- Change database schema during runtime based on logged in user
- Spring + Hibernate : a different object with the same identifier value was already associated with the session
- How to map sql native query result into DTO in spring jpa repository?
- Spring 4 + Hibernate 5 = org.springframework.orm.jpa.EntityManagerHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder
- javax.transaction.Transactional vs org.springframework.transaction.annotation.Transactional
- How to rollback a database transaction when testing services with Spring in JUnit?
- Spring 3.1, Hibernate 4, SessionFactory
- hibernate unique key validation
- hibernate two tables per one entity
- Array with UserType in Hibernate and PostgreSQL –> MappingException
- How to make a database listener with java?
- How to use DTO in JSF + Spring + Hibernate
- Could not initialize proxy – no Session
- How to fetch hibernate query result as associative array of list or hashmap