: 스택 트레이스를 바탕으로의 web.xml없이 리스너를 등록하는 방법
Caused by: 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.
at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:40)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:328)
... 32 more
(그리고 내가 구글 때 결과에 의해), 난
<web-app ...>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
</web-app>
그래서 제 질문은, 어떻게 내가 web.xml 파일을 해달라고 주어진 회색 서버에 리스너를 등록합니다있는 web.xml을에 리스너를 등록해야합니까?
당신이 당신의 web.xml을 더 보여줄 수 - 다른 청취자와 서블릿 정의는 –
안녕하세요 크리스 .. 내 프로젝트는 web.xml 파일이 없습니다 .. org.glassfish.grizzly.http.server.HttpServer – geneqew