Servlet action is not available
在沒有加入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
怎麼辦啊?大蝦
這個問題弄了我幾天了的時間了。好鬱悶
配置如下:
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
怎麼辦啊?大蝦
這個問題弄了我幾天了的時間了。好鬱悶
相關文章
- 007--在Struts2的Action中訪問Servlet API三種形式ServletAPI
- No instances available for XXXAI
- No bean named BookServiceImpl availableBeanAI
- No bean named ''XXX“ availableBeanAI
- Servlet 規範和 Servlet 容器Servlet
- Servlet系列:(一)servlet原理剖析Servlet
- No Task Available解決方法AI
- action概念
- LeetCode in actionLeetCode
- 96.Servlet Servlet生命週期Servlet
- Servlet第二篇【Servlet呼叫圖、Servlet細節、ServletConfig、ServletContext】ServletContext
- 13.there is no action mapped for namespace and action name associated with contAPPnamespace
- patch_id,version, action ,status,action_time,description
- Caused by:.NoSuchBeanDefinitionException: No bean named 'userInfoServiceImpl' availableBeanExceptionAI
- JavaWEB - ServletJavaWebServlet
- JavaWeb——ServletJavaWebServlet
- Servlet概述Servlet
- 《Data Warehouse in Action》
- Ansible: No inventory was passed, only implicit localhost is availablelocalhostAI
- [20191211]Free SGA Memory Available.txtAI
- 【譯】gRPC-Web for .NET now availableRPCWebAI
- Basically Available(基本可用),Soft stateAI
- kafka 錯誤: larger than available brokersKafkaAI
- Spring:錯誤No bean named 'xxxxxxx' availableSpringBeanAI
- Servlet入門Servlet
- 初學ServletServlet
- Servlet 規範Servlet
- Servlet 新手教程Servlet
- Java之ServletJavaServlet
- Servlet-HelloWorldServlet
- Servlet筆記Servlet筆記
- Servlet_6Servlet
- Servlet 如何工作Servlet
- Servlet操作OracleServletOracle
- Github Action釋出Github
- [vuex] unknown action typeVue
- Servlet3.0新特性-非同步處理Servlet、FilterServlet非同步Filter
- No Bean named 'Xxx' available 異常報錯BeanAI
- SpringBoot 學習之 No bean named ‘xxx’ availableSpring BootBeanAI