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也成功。它必须以一定顺序保存,才能成功部署。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>bi</display-name> <filter> <filter-name>Filter_ChangeContentType2GBK</filter-name> <filter-class>com.sanlink.weblib.Filter_ChangeHeader</filter-class> <init-param> <param-name>Content-Type</param-name> <param-value>text/javascript; charset=GBK</param-value> </init-param> </filter> <filter> <filter-name>Filter_BI_JS_CSS</filter-name> <filter-class>com.sanlink.irpt.jsp.filter.Filter_js_css</filter-class> </filter> <filter-mapping> <filter-name>Filter_ChangeContentType2GBK</filter-name> <url-pattern>*.js</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Filter_BI_JS_CSS</filter-name> <url-pattern>*.js</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Filter_BI_JS_CSS</filter-name> <url-pattern>*.css</url-pattern> </filter-mapping> <listener> <listener-class>com.sanlink.irpt.server.ApplicationListener</listener-class> </listener> <servlet> <servlet-name>action</servlet-name> <servlet-class>com.sanlink.irpt.jsp.struts.ServerActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/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</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>Vfs</servlet-name> <servlet-class>com.sanlink.irpt.jsp.IrptVfsServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.sa</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Vfs</servlet-name> <url-pattern>/vfs/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.htm</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.sa</welcome-file> </welcome-file-list> </web-app>