How to enable HTTPS in GWT's Jetty?

后端 未结 2 1169
走了就别回头了
走了就别回头了 2021-02-04 10:09

How can I enable HTTPS in Jetty, which comes with GWT?

2条回答
  •  有刺的猬
    2021-02-04 10:24

    Hi I think this can help some people there, I also use GWT and we were required to use HTTPS.

    Basically we run gwt using maven, so the command is something like this to enable https.

    gwt:debug -Dgwt.style=PRETTY -Dgwt.server=:ssl
    

    And this is how my pom.xml section of the plugin looks like when running using jetty:run-war or jetty:run.

    
        org.mortbay.jetty
        maven-jetty-plugin
        6.1.19
        
            
                commons-logging
                commons-logging
                1.1
            
            
                javax.servlet
                servlet-api
                2.5
            
            
                oracle-jdbc
                ojdbc
                14
            
        
        
            ${project.build.directory}/${warName}.war
            
                
                    8080
                    60000
                
                
                    8443
                    60000
                    ${project.build.directory}/jetty-ssl.keystore
                    jetty6
                    jetty6
                
            
        
    
    
    
        org.codehaus.mojo
        keytool-maven-plugin
        
            
                generate-resources
                clean
                
                    clean
                
            
            
                generate-resources
                genkey
                
                    genkey
                
            
        
        
            ${project.build.directory}/jetty-ssl.keystore
            cn=localhost
            jetty6
            jetty6
            jetty6
            RSA
        
    
    

提交回复
热议问题