Run gwt with https enabled?

一世执手 提交于 2020-01-30 02:38:11

问题


I'm currently running a GWT site with no security, but need to make the switch over to HTTPS.

The working non-secure version runs with these arguments:

-port 8888 -startupUrl ui/index.jsp com.example.EntryPoint

I have read that simply adding -server :ssl will cause the site to be served with HTTPS enabled:

-port 8888 -startupUrl ui/index.jsp -server :ssl com.example.EntryPoint

However, with this I simply get

[ERROR] Unable to load server class ''
[ERROR] java.lang.ClassNotFoundException: 
[ERROR]     at java.lang.Class.forName0(Native Method)
[ERROR]     at java.lang.Class.forName(Class.java:249)
[ERROR]     at com.google.gwt.dev.DevMode$ArgHandlerServer.setString(DevMode.java:108)
[ERROR]     at com.google.gwt.util.tools.ArgHandlerString.handle(ArgHandlerString.java:26)
[ERROR]     at com.google.gwt.util.tools.ToolBase.processArgs(ToolBase.java:225)
[ERROR]     at com.google.gwt.dev.ArgProcessorBase.processArgs(ArgProcessorBase.java:29)
[ERROR]     at com.google.gwt.dev.DevMode.main(DevMode.java:281)
[ERROR] Google Web Toolkit 2.1.0

I'm not sure if I'm doing something wrong or if that method doesn't work any more? Is anyone successfully running this command or gwt with SSL?


回答1:


Assuming you are trying to use the embedded jetty server, SSL support was added in r9628. You are using GWT 2.1, so either try to update to a more recent version (at least GWT 2.3), or use an external SSL-preconfigured server for your application (option -noserver).



来源:https://stackoverflow.com/questions/15791758/run-gwt-with-https-enabled

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!