users@jersey.java.net

_at_encoding in resource deployed in a web container

From: enzo 660 <enzo.660_at_gmail.com>
Date: Tue, 17 Jun 2008 13:48:08 -0700

Hi,
   I've been trying to use the @Encoded annotation in a resource.

-----------------------------------------------------------------------------------------------------------------
@Path("/helloworld")
public class HelloWorldResource {

        @GET
        @ProduceMime("text/plain")
        @Path("/encode")
        @Encoded
        public String encodedEcho(@QueryParam("str")String retStr){
                return retStr;
        }
}
-----------------------------------------------------------------------------------------------------------------

If I deploy the application in a container (Tomcat) and access the URL
http://localhost:8888/hello/helloworld/encode?str=af,yt!6%20p#4
this is what I get af,yt!6%20p.
I was expecting it to percent encode the special characters. Am I
missing something here?

enzo.660_at_gmail.com