use RequestContextListener or RequestContextFilter to expose the current request

Error 500: Unable to instantiate Action, userLogin, defined for 'index' in namespace '/'Error creating bean with name 'userLogin': Scope 'request' 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.

 

最后把web.xml文件中使用的Listener换成Filter就把问题解决了

 

另外需要注意web.xml中各个标签的顺序,websphere中的web.xml要求比其它系统更严格,一般在weblogic部署成功的不一定能保证在websphere也成功。它必须以一定顺序保存,才能成功部署。



bi


Filter_ChangeContentType2GBK
com.sanlink.weblib.Filter_ChangeHeader

Content-Type
text/javascript; charset=GBK




Filter_BI_JS_CSS
com.sanlink.irpt.jsp.filter.Filter_js_css



Filter_ChangeContentType2GBK
*.js





Filter_BI_JS_CSS
*.js



Filter_BI_JS_CSS
*.css




com.sanlink.irpt.server.ApplicationListener





action
com.sanlink.irpt.jsp.struts.ServerActionServlet

config
/WEB-INF/san-struts-config.xml,/WEB-INF/san-struts-config-js.xml,/WEB-INF/san-struts-config-lib.xml,/WEB-INF/san-struts-config-task.xml,/WEB-INF/san-struts-config-server.xml,/WEB-INF/san-struts-config-setup.xml,/WEB-INF/san-struts-config-test.xml,/WEB-INF/san-struts-config-oem.xml


debug
2

2



Vfs
com.sanlink.irpt.jsp.IrptVfsServlet



action
*.sa


Vfs
/vfs/*



index.htm
index.html
index.sa

 

 

你可能感兴趣的:(use RequestContextListener or RequestContextFilter to expose the current request)