title: Accessing HttpServletRequest properties within a WebSocket @ServerEndpoint
body: <p>I need to access the <code>HttpServletRequest</code> properties to get the <em>javax.servlet.request.X509Certificate</em> which contains the <code>X509Certificate</code> array of certificates for TLS requests.</p>
  
  <p>From a JAX-RS <code>ContainerRequestFilter</code> I can easily extract this from the <code>ContainerRequestContext.getProperty(String property)</code> method, but I can't find a way to get it from the WebSocket <code>Session</code> nor the <code>HandshakeRequest</code>, from which I can access the <code>HttpSession</code> instance but not the <code>HttpServletRequest</code> one.</p>
  
  <p>Note: this is not a duplicate of <a href="https://stackoverflow.com/questions/17936440">Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint</a> since I need accesso to the <code>HttpServletRequest</code> (or equivalent to extract the TLS certificates), not <code>HttpSession</code>.</p>
  
  <p>Since WebSocket is a superset of HTTP, I guess it should be possibile and hope the Java team had thought of a way to access the servlet properties, but I really couldn't find one. Anyone knows if this is possible at all?</p>