@@ -0,0 +1,985 @@
+package jaxrs;%0A%0Aimport javax.ws.rs.container.ContainerRequestContext;%0Aimport javax.ws.rs.container.ContainerResponseContext;%0Aimport javax.ws.rs.container.ContainerResponseFilter;%0Aimport javax.ws.rs.ext.Provider;%0Aimport java.io.IOException;%0A%0A/**%0A * Some web containers, such as WebSphere Liberty, serve JAX-RS HTML responses as ISO-8859-1%0A * regardless of what the JSP file indicates. This filter checks for HTML responses and%0A * forces their content charset to UTF-8.%0A */%0A@Provider%0Apublic class UTFFilterResponse implements ContainerResponseFilter %7B%0A    @Override%0A    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException %7B%0A        String contentType = responseContext.getHeaderString(%22Content-Type%22);%0A        if(contentType != null && contentType.startsWith(%22text/html%22)) %7B%0A            // Set it to UTF-8%0A            responseContext.getHeaders().putSingle(%22Content-Type%22, %22text/html;charset=UTF-8%22);%0A        %7D%0A    %7D%0A%7D%0A

Add UTF-8 response filter for WebSphere