该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-09-23
web.xml部分配置如下: <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/struts-config.xml</param-value> </init-param> <init-param> <param-name>config/fund</param-name> <param-value>/WEB-INF/struts-config/struts-config-fund.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> struts-config-fund.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="fundForm" type="com.fundSystem.fund.form.FundForm" /> </form-beans> <global-exceptions /> <global-forwards > <forward name="success" path="/success.jsp" /> <forward name="error" path="/error.jsp" /> </global-forwards> <action-mappings > <action path="/insertFund" attribute="fundForm" name="fundForm" input="/fund_add.jsp" scope="request" type="org.springframework.web.struts.DelegatingActionProxy" > <forward name="success" path="/success.jsp" contextRelative="true"/> </action> </action-mappings> <message-resources parameter="message_zh_cn" null="false"/> </struts-config> jsp页面如下: <html:form action="/insertFund method="post"> <table width="564" height="82" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2" bordercolor="#E6E6E6"> <tr> <td width="203" height="28">产品编号:</td> <td width="204"><html:text property="fund_no"></html:text> *</td> </tr> <tr> <td width="203" height="28">产品名称:</td> <td width="204"><html:text property="fund_name"></html:text> *</td> </tr> <tr> <td height="26">产品价格(RMB):</td> <td><html:text property="price"></html:text> *</td> </tr> <tr> <td height="26"> 产品描述:</td> <td><html:textarea property="description"></html:textarea> *</td> </tr> </table> <p align="center"> <input type="submit" name="Submit" value="添加"> <input type="reset" name="reset" value="重置"> </p> </html:form> 输入数据提交后报如下错误,寻求解决方法,在此感激涕零. message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot retrieve mapping for action /insertFund org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.fund.fund_005fadd_jsp._jspService(fund_005fadd_jsp.java:87) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-09-24
198
|
|
返回顶楼 | |
发表时间:2007-09-24
不要急兄弟,你先把jsp中的.do去掉,在web-inf下新建文件夹fund,把这个jsp放在这个文件夹内,然后再提交试试。关键是你查看jsp源码时是否能看到
<form action="/fund/insertFund.do" method=fund" method="post">,如果是这样应该就能找到了。 |
|
返回顶楼 | |
发表时间:2007-09-24
还请兄台留步,我已经在WebRoot下面建立了fund目录,并且相关的JSP页面放在里面了.这个也改成了action="/insertFund,现象依旧.
Cannot retrieve mapping for action /insertFund 郁闷 |
|
返回顶楼 | |
发表时间:2007-09-24
你查看jsp源码,看form标签生成的具体提交路径是什么?应该是/fund/insertFund才能找到
|
|
返回顶楼 | |
发表时间:2007-09-24
我是通过一个页面链接到fund_find.jsp,现在就是无法链接过去,报错找不到:Cannot retrieve mapping for action /insertFund
我把fund_find.jsp页面改成这样也不行:<html:form action="/fund/insertFund method="post"> <div class="menutitle" onMouseOver="SwitchMenu('sub1')" onMouseOut="SwitchMenu('sub1')"><img src="img/1.gif" width="180"><span class="submenu" id="sub1"> - <a href="fund/fund_add.jsp" target="bottomFrame">添加基金产品</a><br> - <a href="fund/fund_find.jsp" target="bottomFrame">查询产品信息</a><br> </span> </div><br> |
|
返回顶楼 | |
发表时间:2007-09-26
是否有人可以指点一二...
|
|
返回顶楼 | |
发表时间:2007-09-26
没人理,怎么回事?看来要去书城找书才行了!
|
|
返回顶楼 | |
发表时间:2007-09-27
和我的一样的问题。顶一下,如果解决了帖出来
|
|
返回顶楼 | |
发表时间:2007-09-27
俺也是初学者,遇到的问题跟楼主差不多,没有找到解决办法.
尚试了以下几种方式,都不行.郁闷中 <html:form action="/insertFund method="post"> <html:form action="insertFund.do method="post"> <html:form action="/fund/insertFund method="post"> <html:form action="/fund/insertFund.do method="post"> |
|
返回顶楼 | |