CustomProtocolHandler query string

Post here questions and problems related to oXygen frameworks/document types.
odovao
Posts: 12
Joined: Tue Oct 04, 2016 12:18 pm

CustomProtocolHandler query string

Post 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
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: CustomProtocolHandler query string

Post 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
coggers
Posts: 3
Joined: Wed Nov 16, 2016 6:22 pm

Re: CustomProtocolHandler query string

Post 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
Post Reply