में चलाने के लिए टॉमकैट -7 एम्बेड करें मैं एम्बेडेड टॉमकैट चलाने के लिए चाहता हूं जो केवल HTTPS (8443) का उपयोग करता है। मैं 8080 बंदरगाह का उपयोग नहीं करना चाहता हूं। कोई विचार?केवल https
Connector httpsConnector = new Connector(); httpsConnector.setPort(httpsPort); httpsConnector.setSecure(true); httpsConnector.setScheme("https"); httpsConnector.setAttribute("keystoreFile", appBase + "/.keystore"); httpsConnector.setAttribute("clientAuth", "false"); httpsConnector.setAttribute("sslProtocol", "TLS"); httpsConnector.setAttribute("SSLEnabled", true); Tomcat tomcat = new Tomcat(); tomcat.getService().addConnector(httpsConnector); tomcat.setPort(8080); Connector defaultConnector = tomcat.getConnector(); defaultConnector.setRedirectPort(8443); tomcat.setBaseDir("."); tomcat.getHost().setAppBase(appBase); StandardServer server = (StandardServer) tomcat.getServer(); AprLifecycleListener listener = new AprLifecycleListener(); server.addLifecycleListener(listener);
धन्यवाद
क्या आपने 8080 पोर्ट को मना करने का प्रबंधन किया था? –