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
怎麼辦啊?大蝦
這個問題弄了我幾天了的時間了。好鬱悶
相關文章
- struts+spring+hibernate搞了一天,總是有Servlet action is not available異常,高手指教一下SpringServletAI
- struts/Servlet,action轉到jsp後,路徑問題(struts2,jsp路徑,action路徑,action跳轉,相對路徑,絕對路徑)...ServletJS
- 007--在Struts2的Action中訪問Servlet API三種形式ServletAPI
- Servlet技術---Servlet深化Servlet
- InputStream之available()AI
- No free sectors availableAI
- action概念
- Servlet系列:(一)servlet原理剖析Servlet
- Servlet技術----Servlet入門Servlet
- No bean named BookServiceImpl availableBeanAI
- patch_id,version, action ,status,action_time,description
- Servlet.service() for Servlet jsp threw exception javax.servlet.ServletException:File "/pageFooServletJSExceptionJava
- Action With AxiosiOS
- 13.there is no action mapped for namespace and action name associated with contAPPnamespace
- JavaWeb——ServletJavaWebServlet
- JavaWEB - ServletJavaWebServlet
- No Task Available解決方法AI
- List Available DBCC CommandsAI
- struts2的異常There is no Action mapped for namespace / and action nameAPPnamespace
- Github Action釋出Github
- SSH框架之Action框架
- LeetCode in actionLeetCode
- 自定義 Action Bar
- Node.js in ActionNode.js
- QTP的Action模板QT
- No bean named ''XXX“ availableBeanAI
- Myeclipse:No projects are available for deployment to this server!EclipseProjectAIServer
- Percona Toolkit 2.2.5 is now availableAI
- ant available什麼任務?AI
- No instances available for XXXAI
- Servlet操作OracleServletOracle
- Servlet 如何工作Servlet
- Java之ServletJavaServlet
- Servlet筆記Servlet筆記
- Servlet 新手教程Servlet
- Web核心-ServletWebServlet
- Servlet面試題Servlet面試題
- servlet詳解Servlet