Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3157

Changing form to utilise an enctype multipart/form-data creating Issue while page submit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.0.6
    • 2.1.8
    • None
    • None

    Description

      simple form with multiple submit buttons, each going to a different action mapping (or method) works fine, for example:

      <s:form action="UpdateDocument" method="post">
      <s:submit title="Unpublish" method="unpublish" />
      <s:submit title="Publish" method="publish" />
      </s:form>

      Attempt to change the form to use a multipart/form-data enctype (Which is important as we will be adding a file upload to this form), i.e.:

      <s:form action="UpdateDocument" method="post" enctype="multipart/form-data">
      <s:submit title="Unpublish" method="unpublish" />
      <s:submit title="Publish" method="publish" />
      </s:form>

      The first button press is working fine but subsequent button press for submitting the page is not working. It throws NULL pointer exception as none of the data objects are getting submitted again.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sribalaji Sri Balaji
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: