关于struts2下input实现上传jsp页面报错,在线等大神帮我 5C

图片说明
关于struts2下input实现上传,上传MP3,视频和jpg格式的文件导致的jsp页面报错,
红色圈出的位置报错,而上传text,文档png格式的文件ok,目前就测了这么多,
一下是产生的错误:
tag 'select', field 'list', name 'preplan.preplanType': The requested list key 'preplanTypeList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
at org.apache.struts2.components.Component.fieldError(Component.java:263)
at org.apache.struts2.components.Component.findValue(Component.java:356)
at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:82)
at org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:893)
at org.apache.struts2.components.UIBean.end(UIBean.java:535)
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
at org.apache.jsp.tse.emerpreplan.add_005femer_005fpreplan_jsp._jspx_meth_s_005fselect_005f0(add_005femer_005fpreplan_jsp.java:405)
at org.apache.jsp.tse.emerpreplan.add_005femer_005fpreplan_jsp._jspx_meth_s_005fform_005f0(add_005femer_005fpreplan_jsp.java:235)
at org.apache.jsp.tse.emerpreplan.add_005femer_005fpreplan_jsp._jspService(add_005femer_005fpreplan_jsp.java:101)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)

2个回答

name 'preplan.preplanType' preplan 这个你从哪里来的?

xkgemon
xkgemon 知道问题了,是struts2限制默认上传文件大小为2m,但是看了许多人说的修改大小的方法,我添加上无效啊
3 年多之前 回复

这个是从后台传过来的,自己写了个demon,发现input file上传MP3,会跳转到404这是怎么回事,上传文档却可以

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问