gpt4 book ai didi

java - 无法检索表单 bean 的定义

转载 作者:行者123 更新时间:2023-12-01 23:07:09 24 4
gpt4 key购买 nike

我的 jsp 页面出现以下错误:

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve definition for form bean myLoginForm
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:535)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)


org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.dps.onlineAdmissions.util.LoginFilter.doFilter(LoginFilter.java:57)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

struts-config.xml 中我的表单 bean 是:

<form-beam name="myLoginForm" type="com.dps.onlineAdmissions.form.MyLoginForm" />

我的操作标签是:

<action type="com.dps.onlineAdmissions.action.MyLogin" path="/MyLogin" 
name="myLoginForm" validate="true" input="/Index2.jsp" scope="request">

<forward name="newUser" path="/welcome.jsp" />
<forward name="validUser" path="/welcome.jsp" />
<forward name="loginPage" path="/login.jsp" />
<forward name="newApp" path="/newApplication.do" />
<forward name="migrateStudent" path="/LoginByPassAction.do" />
<forward name="selectProg" path="/selectProgram.jsp" />
</action>

我试图解决几个小时内的错误,但没有取得任何成功。导致此错误的原因是什么?如何修复?

谢谢!

最佳答案

应该是

<form-beans>
<form-bean name="myLoginForm" type="com.dps.onlineAdmissions.form.MyLoginForm"/>
</form-beans>

标签中没有form-b​​eam。纠正拼写错误

关于java - 无法检索表单 bean 的定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22592579/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com