Servlet action is not available

iExploiter發表於2006-05-17
在沒有加入spring的時候,我的例程是可以正確執行的,但是加入了spring之後,就不能執行了,為什麼?
配置如下:

struts-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
<data-sources />
<form-beans >
<form-bean name="LoginForm" type="com.dev.zhang.struts.forms.LoginForm" />

</form-beans>

<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="LoginForm"
input="/login.jsp"
name="LoginForm"
path="/login"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy" >
<forward name="test" path = "/index.jsp"/>
</action>

</action-mappings>
<!-- org.springframework.web.struts.DelegatingActionProxy -->
<message-resources parameter="com.dev.zhang.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />
</plug-in>

</struts-config>

applicationContext.xml如下所示


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
<bean name="/login"
class="com.dev.zhang.struts.action.LoninAction"
singleton="false"></bean>
</beans>


每次執行action="/login.do"的時候,就提示
Servlet action is not available


怎麼辦啊?大蝦
這個問題弄了我幾天了的時間了。好鬱悶

相關文章