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

Several improvements

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Future
    • Fix Version/s: 2.2.3
    • Component/s: Plugin - REST
    • Labels:
      None
    • Flags:
      Patch

      Description

      • Method to check which HTTP methods are allowed using OPTIONS.
      • Default implementation for POST and PUT if client sends request header "expect: 100-continue".
      • Verification of action returns to allow String, HttpHeaders, Result or null.
      • The default method "index" in "RestActionSupport" return Object instead String in order to allow for HttpHeaders or Result to be returned.
      • Result processing is delayed after all interceptors have finished.
      • New configuration parameter to show the processing time via log4j. Will show action processing time plus interceptors and result processing time (JSP, XML, ...).
      • The new flow of result processing is:
      • The content is selected (model, exception or errors list)
      • Use HttpHeaders to apply the headers, etc.
      • If the result code is 304 the result is not processed.
      • If the result is a HttpHeaderResult, it is executed regardless of representation.
      • The result is always returned according to the requested representation.
      • If there are errors, it will look for a result named "default-error" to be able to configure the error page. It could be configured in the web.xml but the request representation would not be respected.

        Attachments

        1. struts-rest-all.patch
          37 kB
          Albert Espelt

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              albert.espelt@esilog.com Albert Espelt
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: