Hi Shani,

in Jaggey, the response.sendRedirect() method invokes the
HttpServletResponse.sendRedirect() method which sends "302 Found" response
to the browser. Then the browser initiates a new request to the URL which
is passed via the "Location" HTTP header.

ex:
HTTP/1.1 302 Found
Location: http://www.example.com/

Therefore, you won't be able to pass a custom HTTP header along with the
response.sendRedirect() method.

[1]
http://stackoverflow.com/questions/17227511/pass-header-parameters-with-sendredirect-url


Regards,

*Lasantha Samarakoon* | Software Engineer
WSO2, Inc.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 (71) 214 1576
Email:  lasant...@wso2.com
Web:    www.wso2.com

lean . enterprise . middleware

On Fri, Oct 16, 2015 at 10:32 AM, Shani Ranasinghe <sh...@wso2.com> wrote:

> [+ WSO2 Dev]
>
> On Fri, Oct 16, 2015 at 10:12 AM, Shani Ranasinghe <sh...@wso2.com> wrote:
>
>>
>> Hi,
>>
>> I have a requirement where I need to do a redirect from a Javascript, and
>> I need to send some headers along with it too.
>>
>> The scenario is as follows.
>>
>> From my jaggery layer, I use a JS.At the JS, I receive a callbackURL  & a
>> workflow reference Id, I need to pass this to the external party to which I
>> would redirect so that they could use those information to communicate back
>> to the APIM.  It is better if we can send this via headers from the JS
>> (because in HTTPS headers will be secured).
>>
>> Cookies, is not a good choice, as browsers can disable them, Forms put in
>> an additional popup & notifies that the data is transmitted insecurely,
>> hence forms are not a good option as well.
>>
>> Could we use XMLHttpRequest for this? however, we are not expecting a
>> response.
>>
>> Are there any other alternatives?
>>
>> Any help is appreciated.
>>
>> --
>> Thanks and Regards
>> *,Shani Ranasinghe*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 77 2273555
>> Blog: http://waysandmeans.blogspot.com/
>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
>>
>
>
>
> --
> Thanks and Regards
> *,Shani Ranasinghe*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 2273555
> Blog: http://waysandmeans.blogspot.com/
> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to