struts 子模块问题

Shine_Panda Shine_Panda 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我用struts 配置了一个子模块 struts-config-cao.xml 各个配置都没出问题,在该子模块中新建了一个注册的逻辑
regist.jsp 如下:
<html:form action="/cao/regist">
name : <html:text property="name"/> <html:errors property="name"/> <br/>
pwd : <html:text property="pwd"/> <html:errors property="pwd"/> <br/>
<html:submit/> <html:cancel/>

</html:form>

struts-config-cao.xml 中的配置是:
<action
attribute="registForm"
input="/regist.jsp"
name="registForm"
path="/regist"
scope="request"
type="com.cao.struts.action.RegistAction" />


配置

当第一次进如该页面时 可以正常运行. 可刷新一下再运行是出现
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /cao/regist
这样的异常信息.

如果将 <html:form action="/cao/regist"> 中的action 该为 "/regist"
一次都不可以运行 并出现
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /cao/regist
异常


希望个位高手帮忙解决. 谢谢!
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
Shine_Panda
Web 开发 81,108 成员 341,721 内容