How to receive client certificate in an HTTP request?
问题 I have generated self signed SSL certificate and given to a client. Every time, the client sends a REST request, I do client certificate authentication on the server. I need to get get data of the certificate in the java code. How do I do that? I have used jersey framework. 回答1: You can use @Context Annotation for extracting HttpServletRequest. @POST @Path("/getHelloWorld") @Consumes(MediaType.APPLICATION_JSON) public String helloWorld(@Context HttpServletRequest httpRequest) {