Page 1 of 1

CustomProtocolHandler query string

Posted: Fri Nov 11, 2016 4:07 pm
by odovao
Hi,

I have a customprotocolHandler implementation in which I need to read a number of values from the URL (web parameters).

Example;
- From

Code: Select all

http://server/oxygen-webapp/app/oxygen.html?url=connector:/test-200&author=user&accessType=AUTHOR&token=token 
- I need to capture user, accessType and token

It looks like URLStreamHandler does not contain that information. Could you advice please?

Thanks

Re: CustomProtocolHandler query string

Posted: Mon Nov 14, 2016 3:57 pm
by cristi_talau
Hello,

Web Author usually passes the query string to the URLStreamHandler.

One possible cause for the problem you experience is that the "url" parameter value is not properly encoded. The URL should look like:

Code: Select all

http://server/oxygen-webapp/app/oxygen.html?url=connector%3A%2Ftest-200%26author%3Duser%26accessType%3DAUTHOR%26token%3Dtoken
Please let me know if you are still not able to retrieve the query params.

Best,
Cristian

Re: CustomProtocolHandler query string

Posted: Thu Nov 17, 2016 2:59 pm
by coggers
After the connector values escaping a question mark rather than an andpercent did it for me, i.e. the URL will look like

Code: Select all

http://server/oxygen-webapp/app/oxygen.html?url=connector%3A%2Ftest-200%3Fauthor%3Duser%26accessType%3DAUTHOR%26token%3Dtoken