I use the default which is

struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest

What would the jakarta-stream do that is different?

On 23/01/2024 03:12, Burton Rhodes wrote:
The biggest issue I'm having at the moment is with all of my multi-part forms that include parameter data and a file. The action does receive the file, but the parameter "team.company" is set to the String value of stream, for example: "org.apache.commons.fileupload2.core.MultipartInput$ItemInputStream@1afaa502"  Am I missing something obvious?

To add, it actually doesn't matter if I have a file field in the form.  Any form with [enctype="multipart/form-data"] never sets the action fields properly.  Is there a different parser I should be referencing?  Or are my interceptors not correct?


Example Form
<s:form name="frmTeamInfo" action="AdminTeam_update"
        method="post" enctype="multipart/form-data" accept-charset="utf-8">
    <s:textfield name="team.company" />
    <s:file id="logoFileUpload" name="upload"/>
    <s:submit value="Save" />
</s:form>

Parser
<constant name="struts.multipart.parser" value="jakarta-stream" />

Interceptor Stack
<interceptor-stack name="myParamsPrepareParamsStack">
    <interceptor-ref name="exception"/>
    <interceptor-ref name="checkbox"/>
    <interceptor-ref name="datetime"/>
    <interceptor-ref name="multiselect"/>
    <interceptor-ref name="params"/>
    <interceptor-ref name="servletConfig"/>
    <interceptor-ref name="httpMethod"/>
    <interceptor-ref name="prepare"/>
    <interceptor-ref name="modelDriven"/>
    <interceptor-ref name="fileUpload"/>
    <interceptor-ref name="actionFileUpload"/>
    <interceptor-ref name="staticParams"/>
    <interceptor-ref name="actionMappingParams"/>
    <interceptor-ref name="params"/>
    <interceptor-ref name="conversionError"/>
    <interceptor-ref name="validation">
        <param name="excludeMethods">input,back,cancel,browse</param>
    </interceptor-ref>
    <interceptor-ref name="workflow">
        <param name="excludeMethods">input,back,cancel,browse</param>
    </interceptor-ref>
    <interceptor-ref name="debugging"/>
</interceptor-stack>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to