I've just started looking at the javax.websocket implementation in tomcat 8 > and I have a question about how one integrates an endpoint with application > code. Using servlets as an analogy, web.xml allows configuration > information to be passed to servlets when they are initialized. Is there > an equivalent in the javax.websocket world? If not, are there any > suggested practices for achieving this? >
and i have a follow up question about this, with a servlet or a filter you can do: getServletContext() then you have access to the resources of the web application and stuff like that How is that possible in an websocket endpoint? If i want to load in a file that is in the current webapps WEB-INF dir how do i do that? How do i get an url or inputstream (getResource() call) to that file? johan