Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jersey 如何通过和阅读&;在@QueryParam Jax-RS中_Jersey_Jax Rs_Query Parameters - Fatal编程技术网

Jersey 如何通过和阅读&;在@QueryParam Jax-RS中

Jersey 如何通过和阅读&;在@QueryParam Jax-RS中,jersey,jax-rs,query-parameters,Jersey,Jax Rs,Query Parameters,我有一个Rest服务接受QueryParam,其中的值有&以及如何传递它并将其作为查询参数接受 这里我附上我使用的源代码。 我也打电话给你 http://localhost:7001/Rest/GetInfo?type=J&Y as & is the seperator its taking only till J. if i use "\" then its not working. http://localhost:7001/Rest/GetInfo?type=J\&

我有一个Rest服务接受QueryParam,其中的值有&以及如何传递它并将其作为查询参数接受

这里我附上我使用的源代码。 我也打电话给你

http://localhost:7001/Rest/GetInfo?type=J&Y
as & is the seperator its taking only till J.
if i use "\" then its not working.
http://localhost:7001/Rest/GetInfo?type=J\&Y

    I am deploying on Weblogic.

    @GET
    @Path("/GetInfo")
    //@Produces("text/javascript")
    @Produces("application/json")
    public String getInfo(@QueryParam("type") String type)
    {
            // i am reading the type here
            if(type != null
                getUserType(type)
    }

您需要对url进行如下编码:
http://localhost:7001/Rest/GetInfo?type=J%26Y