描述:
1.logon.jsp页面中一个表单对象,用于提交登录的用户名和密码:
<html:form action="/system/logon.do?action=logon">
2.两个struts模块:struts-config.xml,struts-config-system.xml.要求是/system/logon.do是映射到struts-config-system.xml文件.
问题:
用户第一次访问的时候,是处于default模块的,当提交表单时,系统不会到struts-config-system.xml文件中找,而是到struts-config.xml中找,所以会报以下错误:javax.servlet.ServletException: Cannot retrieve mapping for action /system/logon
后来我试过各种写法(/logon.do,../logon.do等)都没成功.我看了一下最新的struts包中的<html:link/>,他有个module属性,可以很方便的转到指定的模块.而<html:form />没有.
不知道哪位高手有解决方法?(我不希望把/logon.do放到default模块中)