public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); servletContext = servletConfig.getServletContext(); try { SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance(); con = scf.createConnection(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to open a SOAPConnection", e); } InputStream in = servletContext.getResourceAsStream("/WEB-INF/address.properties"); if (in != null) { Properties props = new Properties(); try { props.load(in); to = props.getProperty("to"); data = props.getProperty("data"); } catch (IOException ex) { // Ignore } } }