I have now set
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.ServletMultiPartRequest
<servlet>
<servlet-name>fileUploadServlet</servlet-name>
<servlet-class>org.apache.struts2.dispatcher.servlet.FileUploadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fileUploadServlet</servlet-name>
<url-pattern>/fileupload/*</url-pattern>
<url-pattern>/tags/ui/*</url-pattern>
</servlet-mapping>
#####
I get in FileUploadSupport.java
isMultipartRequest == false
isServletMultipartRequest == true
and an error:
Error uploading: No boundary defined!!
#####
My upload action is /user/resources.action
<s:form id="uploadFiles" action="resources" method="POST"
enctype="multipart/form-data">..</form>
#####
If I change isMultipartRequest == true I get
Status Code 404
Message The requested resource [/user/resources.action] is not available
On 29/12/2022 11:41, Lukasz Lenart wrote:
czw., 29 gru 2022 o 11:55 Greg Huber<gregh3...@gmail.com> napisał(a):
I made no changes just used the branch as is. I tried deleting the
commons jar to make sure it was using the new code but my app won't
start without it.
Cool, it means I didn't break any existing configuration :D
Did you change the value of the "struts.multipart.parser" constant?
..If I add a breakpoint on FileUploadSupport isFileUploadRequest(..) it
stops so I assume its being used.
Yes, it is used just to verify if request should be left to be
processed by the servlet, to full use the new @MultipartConfig you
must add the following servlet in your web.xml plus additional mapping
https://github.com/apache/struts/pull/650/files#diff-058a38cfcdd6de381467549793200fd7c1e0f790a1de1fd72e27cd2cf4a06079
Regards