1 Reply Latest reply on Aug 7, 2009 4:25 PM by alexsmirnov

    Explicitly setting the content type for AJAX requests

    cgrohowski

      Hi,

      I have an issue using any a4j:commandButton or commandLink - I am behind a WebSEAL (reverse proxy) and the proxy is configured to not add cookies to requests that are not marked as text/html or application/x-www-form-urlencoded or something similar. Basically, I am wondering if there's a way to explicitly set the content-type of ajax requests in the application? Any help is greatly appreciated.

      Thanks.

        • 1. Re: Explicitly setting the content type for AJAX requests
          alexsmirnov

          It is not possible to use content-type other than 'text/xml' for AJAX requests because client-side XMLHttpRequest object parses only such responses, everything else interpreted as text only that breaks client-side library. The only way is to configure WebSEAL library to pass cookie for 'text/xml' responses or disable cookies at all ( in the last case JSESSIONID will be encoded into all URL's ).