在tomcat下运行正常,但是在jboss下报Action class [loginAction] not found
在struts的配置文件中配置如下:
<constantname="struts.objectFactory"value="org.apache.struts2.spring.StrutsSpringObjectFactory"/>
<constantname="struts.devMode"value="true"></constant>
<packagename="main"extends="struts-default">
<actionname="*"class="loginAction"method="{1}">
<resultname="success">{1}.jsp</result>
<resultname="input">fal.jsp</result>
</action>
spring中action配置爲:
<beanid="loginAction"class="com.vanceinfo.action.LoginAction"scope="prototype">
<propertyname="userService"ref="userServiceImpl"></property>
</bean>
我用tomcat运行时一切正常,但是用jboss启动的时候会报如下错误:
Actionclass[loginAction]notfound-action-vfsfile:/D:/jboss-5.1.0.GA/server/default/deploy/ssh2.war/WEB-INF/classes/struts.xml:21:53
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:374)
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:329)
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:429)
atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
atorg.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
atcom.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
atcom.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
atorg.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
atorg.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
atorg.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
一开始以为是还没反应过来,可是我把jboss目录下该war删除重新运行依旧出错,实在不理解为什么,还望高手相助。