2015-09-15 42 views
0

在Struts 1.2中,我试图创建一个新的html:表单。无法检索操作错误的映射-html:表单

<html:form action = "/doRequestCAP" style="display:inline;"> 
</html:form> 

但是当我尝试加载页面时出现此错误。

Error 500: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /doRequestCAP 

我检查了格式的动作和表单定义,他们看起来很好。

<form-bean name="requestCAPForm" type="project.web.RequestCAPForm"/> 

<action path=/requestCAP" 
type="project.RequestCAPAction" 
name="requestCAPForm" 
validate="true" 
input="viewClaimants.do" //the page this form is on 
scope="request" 
> 
<forward name="success" path="viewclaimants.do"/> 
</action> 

无论是requestCAPForm和RequestCAPAction java类都被放置在名.web目录(目前他们没有做任何事情),并导入到requestCAP.jsp类。我已经尝试了多种声明行为表单的变体无济于事,并且无法找到我在任何地方做错的明确答案。我错过了什么?

回答

0

将替换为<action path="/doRequestCAP"