Cannot find ActionMappings or ActionFormBeans collection,實在是搞不定了
struts的最簡單的程式
老是報錯Cannot find ActionMappings or ActionFormBeans collection
快一天了,實在不知道哪裡錯了,大家幫忙呀
我用的是jdkj2sdk1.4.2_09,eclipse3.1.0 myeclipse 4.0gae31
struts的配置檔案是:
web.xml為:
firstjsp為
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<html>
<head>
<title>JSP for firstForm form</title>
</head>
<body>
<html:form action="/first.do">
length : <html:text property="length"/><html:errors property="length"/><br/>
username : <html:text property="username"/><html:errors property="username"/><br/>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
FirstAction就是轉移了個頁面
return mapping.findForward("success");
實在不知道怎麼辦了,幫忙呀
老是報錯Cannot find ActionMappings or ActionFormBeans collection
快一天了,實在不知道哪裡錯了,大家幫忙呀
我用的是jdkj2sdk1.4.2_09,eclipse3.1.0 myeclipse 4.0gae31
struts的配置檔案是:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <data-sources /> <form-beans > <form-bean name="FirstForm" type="com.airhork.struts.form.FirstForm" /> </form-beans> <global-exceptions /> <global-forwards /> <action-mappings > <action attribute="FirstForm" input="/form/first.jsp" name="FirstForm" path="/first" scope="request" type="com.airhork.struts.action.FirstAction" > <forward name="success" path = "/success.jsp"/> </action> </action-mappings> <message-resources parameter="com.airhork.struts.ApplicationResources" /> </struts-config> <p class="indent"> |
web.xml為:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>action</servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>application</param-name> <param-value>ApplicationResources</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <p class="indent"> |
firstjsp為
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<html>
<head>
<title>JSP for firstForm form</title>
</head>
<body>
<html:form action="/first.do">
length : <html:text property="length"/><html:errors property="length"/><br/>
username : <html:text property="username"/><html:errors property="username"/><br/>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
FirstAction就是轉移了個頁面
return mapping.findForward("success");
實在不知道怎麼辦了,幫忙呀
相關文章
- 求救--Cannot find ActionMappings or ActionFormBeans collectionAPPORMBean
- 解決cannot find module providing package或cannot find main modulePackageAI
- Cannot find folder "Maintenance Plans".AINaN
- 解決 Cannot find OpenSSL's
- /usr/bin/ld: cannot find -lopenblas
- 中國式報表搞不定?教程來了!
- Cannot find package module sap/cds/commonPackage
- /usr/bin/ld: cannot find -lmysqlclient_rMySqlclient
- IntelliJ IDEA Cannot find declaration to go toIntelliJIdeaGo
- MapStruct-plus cannot find converter fromStruct
- Vue Router Cannot find module 'XXX.vue'Vue
- Go cannot find package "go-sql-driver/mysql" in any ofGoPackageMySql
- 解決Cannot find module '@angular/compiler-cli'AngularCompile
- Cannot find SS.INI file for user *** 解決方法
- Error: Cannot find configuration directory: /etc/hadoopErrorHadoop
- SP2-0618: Cannot find the Session IdentifierSessionIDE
- PHP報錯:?configure: error: Cannot find libmysqlclientPHPErrorIBMMySqlclient
- Cannot find module ‘webpack-cli/bin/config-yargs‘Web
- Python django報錯ImportError: cannot import name find_specPythonDjangoImportError
- SQL2012報錯:cannot find one or more cpmponentsSQL
- 這樣在管理後臺裡實現 403 頁面實在是太優雅了
- Garbage Collection 一直在執行? 還是需要時才啟動? (轉)
- 在Windows中用find代替grepWindows
- 10:00面試,10:09就出來了 ,問的實在是太...面試
- Oracle job 中 interval 的寫法,實在是太操人了Oracle
- Vue啟動報錯 Cannot find module 'webpack/bin/config-yargs'VueWeb
- spring cvc-elt.1: Cannot find the declaration of element 'beans'解決辦法SpringBean
- PHP動態編譯出現Cannot find autoconf的解決方法PHP編譯
- Node.js裡Cannot find moudle(針對第三方模組)Node.js
- OPatch cannot find a valid oraInst.loc file to locate Central InventoryAI
- 正規表示式的功法大全,做NLP再也不怕搞不定字串了字串
- Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.C++Compile
- vue Cannot find module @/xxx/xxx.ts or its corresponding typeVue
- 問一個白痴問題實在弄不清楚了:JPA到底是標準還是實現
- mongodb操作:利用javaScript封裝db.collection.find()後可呼叫函式原始碼解讀MongoDBJavaScript封裝函式原始碼
- 查詢資料庫後是返回ResultSet還是返回Collection? (轉)資料庫
- Spring Cache 快取註解這樣用,實在是太香了!Spring快取
- 問個netbeans做的介面的問題 實在是不會了Bean