如何在啓用GWT的Jetty中啓用HTTPS?如何在GWT的Jetty中啓用HTTPS?
回答
在gwt-dev.jar中有一個「隱藏」的README-SSL.txt文件。你可以找到最新版本on Github。
特別是,將-server :ssl
添加到Jetty的啓動參數中以使用localhost
的默認自簽名證書。
任何想法,如果這種策略仍然有效?這是我能找到的唯一解決方案,但是如果我使用-server:ssl參數運行GWT,則會出現'無法加載服務器類'''。這看起來很奇怪,沒有-server:ssl參數都運行正常。 – Erix 2013-04-03 15:29:03
請參閱:http://stackoverflow.com/questions/15791758/run-gwt-with-https-enabled關於此問題的擴展問題。 – Erix 2013-04-03 15:39:48
此README-SSL.txt文件確實幫助我解決了嘗試配置自定義信任庫以用於內置服務器(Jetty)而不是本地主機的默認一個證書的問題。 – xRomZak 2015-11-12 11:19:54
嗨,我認爲這可以幫助那裏的一些人,我也使用GWT,我們被要求使用HTTPS。
基本上我們使用maven運行gwt,所以命令是這樣的,以啓用https。
gwt:debug -Dgwt.style=PRETTY -Dgwt.server=:ssl
這是插件我的pom.xml部分看起來如何使用碼頭上運行時,如:運行戰爭或碼頭:運行。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.19</version>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>oracle-jdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
</dependency>
</dependencies>
<configuration>
<webApp>${project.build.directory}/${warName}.war</webApp>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
<connector implementation="org.mortbay.jetty.security.SslSocketConnector">
<port>8443</port>
<maxIdleTime>60000</maxIdleTime>
<keystore>${project.build.directory}/jetty-ssl.keystore</keystore>
<password>jetty6</password>
<keyPassword>jetty6</keyPassword>
</connector>
</connectors>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<id>clean</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<phase>generate-resources</phase>
<id>genkey</id>
<goals>
<goal>genkey</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>${project.build.directory}/jetty-ssl.keystore</keystore>
<dname>cn=localhost</dname>
<keypass>jetty6</keypass>
<storepass>jetty6</storepass>
<alias>jetty6</alias>
<keyalg>RSA</keyalg>
</configuration>
</plugin>
- 1. 如何在Jetty中啓用PUT方法?
- 2. 帶Jetty的https servlet
- 3. 如何在GWT項目中啓用servlet
- 4. Embedded Jetty:如何使用包含在Jetty啓動的.jar中的.war。
- 5. 如何在Maven/Mortbay Jetty Plugin中使用https/ssl?
- 6. 如何在ejabberd 15.09中啓用https?
- 7. 如何在WCF服務中啓用HTTPS
- 8. 如何在Jetbrains Upsource 2.0中啓用HTTPS
- 9. 如何在libcurl中啓用https支持?
- 10. Docker - 在HTTPS上運行Jetty
- 11. 如何使gwt-maven-plugin解析jetty-env.xml
- 12. 在Ubuntu Oneiric中啓用Jetty的SSL(TLS)
- 13. Jetty ProxyServlet:如何添加HTTPS支持?
- 14. Spring MVC https如何啓用?
- 15. 如何爲Jetty 9啓用GZIP
- 16. 如何在Eclipse中設置GWT/Jetty連接池?
- 17. 如何從命令行啓動帶有http和https的不同端口的Jetty
- 18. 在Undertow中啓用HTTPS
- 19. 如何讀取Jetty中的HTTPS連接的TLS版本?
- 20. 如何在Python 2.7 web.py上啓用HTTPS?
- 21. 如何在WCF WsHttp綁定啓用HTTPS
- 22. 如何在Jetty Maven插件中啓用CachingWebAppClassLoader?
- 23. 如何在春季啓動中使用Jetty Quickstart?
- 24. Jetty中緩慢的Https響應
- 25. Heroku上的Jetty:如何在代碼中告訴是否使用了https
- 26. 如何用https使用sbt運行jetty 0.7.7
- 27. 如何使用GWT和(常規servlet)Jetty後端設置eclipse
- 28. 使用https運行gwt?
- 29. Restlet與Jetty在HTTPS上運行BindException
- 30. 如何在Jetty上默認IP地址爲https
爲什麼在開發服務器上需要https? – 2011-06-16 12:56:38
我們的項目中有一些安全功能,只能通過SSL訪問。因此,我也需要測試這個功能。 – Bob 2011-06-17 11:21:43
你是否設法解決它? – mor222 2017-11-12 19:28:36