Bonjour
Je travaille sur une appli Web Struts 1.2 + Spring 2 + Tile
J'utilise Spring annotations. j'ai une classe SecuriteContext :
A un endroit specifique de l'application j'ai l'exception suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 import java.io.Serializable; import java.util.Set; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @Component @Scope("session") public class SecuriteContext implements Serializable { .....
Une erreur s'est produite: ServletException in '/WEB-INF/jsp/WebMenu.jsp': Error creating bean with name "SecuriteContext" : Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
J'ai essayé en rajoutant, comme proposé, RequestContextListener dans web.xml mais j'ai eu la mm erreur..
Qu'est ce que cette erreur veut dire ?
Avez vous des idées ? merci
Partager