CustomProtocolHandler query string

Post here questions and problems related to oXygen frameworks/document types.
odovao
Posts: 12

CustomProtocolHandler query string

Fri Nov 11, 2016 4:07 pm

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: 126

Re: CustomProtocolHandler query string

Mon Nov 14, 2016 3:57 pm

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

Re: CustomProtocolHandler query string

Thu Nov 17, 2016 2:59 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests