How can I get real system file path from within a WebSocket Endpoint
问题 While I am within a Servlet Context I can easily get the real system file path by calling on request.getServletContext().getRealPath(UPLOAD_PATH). Please friends how can I do the equivalent from within a WebSocket Endpoint in Java EE 7. Thanks in advance. 回答1: You can get path information from the ServerEndpointConfig#getPath(). The only difference between the results of this method and ServletContext#getRealPath() is that this gives the relateive path; you could just prefix the results of