":" (colon) Is URL-encoded When Setting "@QueryParam" + "@Encoded" On JAX-RS (Doc ID 2204722.1)

Last updated on NOVEMBER 30, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Symptoms

First, the details of each annotation is the following:

https://docs.oracle.com/javaee/7/api/javax/ws/rs/QueryParam.html

Annotation Type QueryParam
----------cut----------
Values are URL decoded unless this is disabled using the Encoded annotation.
----------cut----------


https://docs.oracle.com/javaee/7/api/javax/ws/rs/Encoded.html

Annotation Type Encoded
----------cut----------
Disables automatic decoding of parameter values bound using QueryParam, PathParam, FormParam or MatrixParam. Using this annotation on a method will disable decoding for all parameters. Using this annotation on a class will disable decoding for all parameters of all methods.
----------cut----------


This issue can be confirmed using the following steps.

(0) Deploy attached app (ParamEncodeTest).
        
MyApplicationConfig.java

 


(1) Access following URLs.
    http://localhost:7001/ParamEncodeTest/rs/encoded/on?param=++::
    http://localhost:7001/ParamEncodeTest/rs/encoded/on/++::

RESULT

case1 : http://localhost:7001/ParamEncodeTest/rs/encoded/on?param=++::
    -> ++::
case2 : http://localhost:7001/ParamEncodeTest/rs/encoded/on/++::
    -> ++::

The ":"(coron) in the QueryParam is URL_encoded.

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms