2 Replies Latest reply on Jun 20, 2012 8:23 AM by 944611

    javax.faces.partial.ajax=true instead of Faces-Request=partial/ajax

      Hello everyone,

      in our organisation we have to use JSF 2.0 application over SSL-Gateway. This gateway passes through only standard HTTP Headers, therefore JSF header "Faces-Request" is deleted from HTTP Request. JSF can not recognize AJAX request and it makes this requests unable to work.

      I've found following statement in JSF 2.0 Spicification (14.2.4 Request Sending Specifics):
      The request header must be set with the name Faces-Request and the value partial/ajax. Specifics of formulating post data and sending the request must be followed as outlined in the JavaScript documentation for the jsf.ajax.request function. The post data arguments that must be sent are:
      javax.faces.partial.ajax = true

      As workaround to our problem I have written my own implementation of PartialViewContext which overwrites isPartialRequest and isAjaxRequest methods. New methods use "javax.faces.partial.ajax" instead of "Faces-Request" to identify AJAX request.

      Is this eligible solution? Is "javax.faces.partial.ajax" parameter just additional flag for AJAX request or it has particular meaning? Can this workaround have unwanted side effects?

      We are using Websphere AS 8 with MyFaces JSF2 implementation.

      Any help is appreciated. Thanks in advance.