我正在尝试创建一个显示下拉列表的页面,但是一旦添加了下拉代码,我的系统就无法工作。我一直试图让这个工作一段时间。有人可以帮助我并告诉我我得到了什么错误
这是我的 JSP:
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>School Visit Report</TITLE>
</HEAD>
<BODY>
<H1 align=left>UFT SCHOOL VISIT REPORT</H1>
<form:form commandName="visit">
<form:select path="reporter" items="${selectableReports}" />
</form:form>
</BODY>
</HTML>
这是我的流程:
<on-start>
<evaluate expression="flowActions.initializeSelectableReport s()"
result="flowScope.selectableReports" />
</on-start>
<view-state id="SchoolVisitReport" view="SchoolVisitReportSmall.jsp">
<transition on="submit" to="endState" />
<transition on="cancel" to="endState" bind="false"/>
</view-state>
这是我的错误:
org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.webflow.execution.FlowExecutio nException: Exception thrown in state 'SchoolVisitReport' of flow 'visit'
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
root cause
org.springframework.webflow.execution.FlowExecutio nException: Exception thrown in state 'SchoolVisitReport' of flow 'visit'
org.springframework.webflow.engine.impl.FlowExecut ionImpl.wrap(FlowExecutionImpl.java:571)
org.springframework.webflow.engine.impl.FlowExecut ionImpl.resume(FlowExecutionImpl.java:262)
org.springframework.webflow.executor.FlowExecutorI mpl.resumeExecution(FlowExecutorImpl.java:169)
org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(FlowHandlerAdapter.java:183)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
root cause
java.lang.IllegalStateException: Exception occurred rendering view org.springframework.web.servlet.view.JstlView: unnamed; URL [/WEB-INF/flows/visit/SchoolVisitReportSmall.jsp]
org.springframework.webflow.mvc.view.AbstractMvcVi ew.render(AbstractMvcView.java:191)
org.springframework.webflow.engine.ViewState.rende r(ViewState.java:296)
org.springframework.webflow.engine.ViewState.refre sh(ViewState.java:243)
org.springframework.webflow.engine.ViewState.resum e(ViewState.java:221)
org.springframework.webflow.engine.Flow.resume(Flo w.java:545)
org.springframework.webflow.engine.impl.FlowExecut ionImpl.resume(FlowExecutionImpl.java:258)
org.springframework.webflow.executor.FlowExecutorI mpl.resumeExecution(FlowExecutorImpl.java:169)
org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(FlowHandlerAdapter.java:183)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
root cause
org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/flows/visit/SchoolVisitReportSmall.jsp at line 15
12: <H1 align=left>UFT SCHOOL VISIT REPORT</H1>
13: <form:form commandName="visit">
14:
15: <form:select path="reporter" items="${selectableReports}" />
16:
17: </form:form>
18: </BODY>