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

Why JSONValidationInterceptor return Status Code 400 BAD_REQUEST instead of 200 SUCCESS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.5.10
    • Fix Version/s: 2.5.12
    • Component/s: Plugin - JSON
    • Environment:

      Jdk 1.7, Windows 10, jQuery 1.7.2

    • Flags:
      Important

      Description

      Since I have made the upgrade of my Struts 2.5.8 to 2.5.10, all my POST Ajax call via jQuery with the parameter "struts.enableJSONValidation=true" return status code 400 Bad Request when my validation on server side is wrong.

      And I have an issue in the caller jQuery.

      Failed to load resource: the server responded with a status of 400 (Bad Request)

      Before in 2.5.8 and all previous versions the status code was 200.

      What is the reason of this changes because jQuery doesn't understand this and it's problematic. I see this WW-4728 but in this bug it was not mention that the status code has to be changed.

      Please provide example in the documentation if the reason of the change is a specific reason

      Thank you in advance for your help.

      Best regards,

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              walkn COMBEAU
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: