server/extensions/websockets/src/main/java/org/apache/vysper/xmpp/extension/websockets/TomcatXmppWebSocketServlet.java [75:95]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void init() throws ServletException {
        super.init();

        if (serverRuntimeContext == null) {
            serverRuntimeContext = (ServerRuntimeContext) getServletContext()
                    .getAttribute(SERVER_RUNTIME_CONTEXT_ATTRIBUTE);
            if (serverRuntimeContext == null) {
                throw new RuntimeException("Failed to get Vysper ServerRuntimeContext from servlet context attribute \""
                        + SERVER_RUNTIME_CONTEXT_ATTRIBUTE + "\"");
            }
        }

        if (stanzaProcessor == null) {
            stanzaProcessor = (StanzaProcessor) getServletContext()
                    .getAttribute(StanzaProcessor.class.getCanonicalName());
            if (stanzaProcessor == null) {
                throw new RuntimeException("Failed to get Vysper StanzaProcessor from servlet context attribute \""
                        + StanzaProcessor.class.getCanonicalName() + "\"");
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



server/extensions/websockets/src/main/java/org/apache/vysper/xmpp/extension/websockets/JettyXmppWebSocketServlet.java [77:97]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void init() throws ServletException {
        super.init();

        if (serverRuntimeContext == null) {
            serverRuntimeContext = (ServerRuntimeContext) getServletContext()
                    .getAttribute(SERVER_RUNTIME_CONTEXT_ATTRIBUTE);
            if (serverRuntimeContext == null) {
                throw new RuntimeException("Failed to get Vysper ServerRuntimeContext from servlet context attribute \""
                        + SERVER_RUNTIME_CONTEXT_ATTRIBUTE + "\"");
            }
        }

        if (stanzaProcessor == null) {
            stanzaProcessor = (StanzaProcessor) getServletContext()
                    .getAttribute(StanzaProcessor.class.getCanonicalName());
            if (stanzaProcessor == null) {
                throw new RuntimeException("Failed to get Vysper StanzaProcessor from servlet context attribute \""
                        + StanzaProcessor.class.getCanonicalName() + "\"");
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



