应该是这样的
<action path="/Logon"
type="OA.LogonAction"
name="LogonForm"
scope="request">
validate="true"
input="/reguser.jsp">
<forward name="success" path="/main.jsp"/> </action>
<action path="/testlink" >
<forward name="yourname" path="/testid.jsp">
</action>
<action path="/Logon"
type="OA.LogonAction"
name="LogonForm"
scope="request">
validate="true"
input="/reguser.jsp">
<forward name="success" path="/main.jsp"/> </action>
<action path="/testlink" >
<forward name="yourname" path="/testid.jsp">
</action>
解决方案 »
- Spring data jpa有个错误,谁能帮我看看
- 【JSP四种会话跟踪技术】????????????????????????????????
- myeclipse怎么连接数据库?
- 本人想学ssh技术,推荐学习资料和学习方法
- 某外资公司急聘:高级JAVA工程师(上海)
- 怎么方便的切换ejb的远程和本地接口?
- EJB3笔记1-EJB3大变脸,实体Bean概念完全颠覆,EJB还有意义吗?
- JTable中的数据怎么进行数据格式转换
- JTable的形式变成JComboBox,使table中的每一行下拉框中的值都不一样,怎么做?
- 请问谁有用EJB开发的完整实例?谢谢(或网上资源)
- 请教高手
- 想找个开源的OA用用,哪位知道?多多指点哦.重谢!
问题是,我配置另一个action的时候就提示javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
这到底是什么原因?
找不到你的form,和前面的对照一下,明显写的不对
<action path="/Logon"
type="OA.LogonAction"
name="LogonForm"
scope="request">
validate="true"
input="/reguser.jsp">
<forward name="success" path="/main.jsp"/>在jsp里面加链接,也不是这么加的啊,用<html:link>
回复人: sjg008(小石) ( ) 信誉:101 2005-01-24 14:52:00 得分: 0
应该是这样的
<action path="/Logon"
type="OA.LogonAction"
name="LogonForm"
scope="request">
validate="true"
input="/reguser.jsp">
<forward name="success" path="/main.jsp"/> </action>
<action path="/testlink" >
<forward name="yourname" path="/testid.jsp">
</action>
Top
回复人: sjg008(小石) ( ) 信誉:101 2005-01-24 14:54:00 得分: 0
action里不能嵌套action的 这就是你为什么去掉两句星号的语句后能正常显示的愿意
<!-- Display the "walking tour" documentation -->
<action path="/tour"
forward="/tour.htm">
</action>
请问这又何解?
<html:link page="/testlink.do">
test
</html:link>
在配置文件中加上
<action path="/testlink"
forward="/testid.jsp">
</action>
运行结果出现
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause java.lang.NullPointerException
org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1281)
org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:425)
org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:486)
org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:350)
org.apache.jsp.untitled1_jsp._jspx_meth_html_link_0(untitled1_jsp.java:130)
org.apache.jsp.untitled1_jsp._jspx_meth_html_html_0(untitled1_jsp.java:94)
org.apache.jsp.untitled1_jsp._jspService(untitled1_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
再运行以前写的一个验证表单,结果为:
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:858)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543)
org.apache.jsp.logon_jsp._jspx_meth_html_form_0(logon_jsp.java:136)
org.apache.jsp.logon_jsp._jspx_meth_html_html_0(logon_jsp.java:99)
org.apache.jsp.logon_jsp._jspService(logon_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
不知道为什么!
但是即就是你在这里不需要actionform 好象仍要在action中对应一个actionfrom 这是必需的
<!-- Display the "walking tour" documentation -->
<action path="/tour"
forward="/tour.htm">
</action>为了验证是否有一个相应的actionForm我把<html:link page="/tour.do">改为
<html:link page="/test.do">
配置文件改为
<action path="/test"
forward="/tour.htm">
</action>
重新启动TOMCAT结果依然能运行!