> I'm not sure what difference that might make, could you elaborate?  I 
> already have one web server talking https to the browser and the SDM script 
> tries to invoke an http connection to the code server. How does adding 
> another server talking HTTPS help the situation?
>
> Sorry if I'm not understanding something, I'm just confused how this would 
> make any difference.
>

Didn't read that you already have a web server that talks HTTPS.

If you want to use the "recompile on reload" feature of GWT 2.7+ then a 
special *.nocache.js file will be generated that has a hardcoded HTTP url 
that you can not change and thus you have to live with the mixed content 
warning of browsers. In Chrome you need to use google-chrome 
--allow-running-insecure-content to allow mixed content again.

If you are fine with using the legacy bookmarklets of SuperDevMode you can 
make your setup work with SSL, although it is a bit of work:

1.) create a custom linker outside of your client/shared/server package 
that allows SSL

public class SslCrossSiteIframeLinker extends CrossSiteIframeLinker {
 
 @Override
 protected String getJsDevModeRedirectHookPermitted(LinkerContext context) {
 return "$wnd.location.protocol == \"https:\" || $wnd.location.protocol == 
\"http:\" || $wnd.location.protocol == \"file:\"";
 }
}

2.) create a new sslapp-DEV.gwt.xml file for your app that you use during 
development and allows HTTP, HTTPS and any host name / IP. Do NOT use that 
module descriptor for a real production compile!

<module rename-to="sslapp">
  <inherits name='com.example.SslApp' /> <!-- the module used for 
production compiles -->
  <define-linker name="xsiframe" class="linker.SslCrossSiteIframeLinker" />
  <set-configuration-property name="devModeUrlWhitelistRegexp" value=
"(http|https)://(.*)(:\d+)?/.*" />
</module>

3.) Compile that dev module using the GWT compiler and store the output in 
a dedicated folder. I'll reference this folder using DEV_APP_FOLDER.

4.) Let your local web server listen on 127.0.0.1:443 and 127.0.0.1:9876 
and create a SSL enabled vhost for each. The vhost of 127.0.0.1:443 should 
point to DEV_APP_FOLDER so you can launch your compiled app through SSL and 
the vhost 127.0.0.1:9876 should redirect everything to your GWT CodeServer 
that should run on a different, local IP (e.g. http://192.168.1.100:9876). 
Using Apache this could look similar to:


Listen 127.0.0.1:443
Listen 127.0.0.1:9876

<VirtualHost 127.0.0.1:443>
 ServerAdmin webmaster@localhost
 # your compiled app
 DocumentRoot "DEV_APP_FOLDER"
 ServerName localhost
 ErrorLog "/var/log/apache2/localhost-error_log"
 CustomLog "/var/log/apache2/localhost-access_log" common
 SSLEngine on
 SSLCertificateFile /etc/ssl/certs/apache.crt
 SSLCertificateKeyFile /etc/ssl/private/apache.key
 <Directory "DEV_APP_FOLDER">
   Options Indexes MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
 </Directory>
</VirtualHost>

<VirtualHost 127.0.0.1:9876>
 ServerAdmin webmaster@localhost
 DocumentRoot "/some/tmp/folder"
 ServerName localhost
 ErrorLog "/var/log/apache2/localhost-codeserver-error_log"
 CustomLog "/var/log/apache2/localhost-codeserver-access_log" common
 SSLEngine on
 SSLCertificateFile /etc/ssl/certs/apache.crt
 SSLCertificateKeyFile /etc/ssl/private/apache.key
 # proxy everything from https://127.0.0.1:9876 to CodeServer running on 
http://192.168.1.100:9876
 ProxyPass / http://192.168.1.100:9876/
</VirtualHost>

5.) Start DevMode / CodeServer using -bindAddress 192.168.1.100 (your 
host's ip address)

6.) Visit https://127.0.0.1:9876 and you should see the CodeServer as the 
SSL connection is proxied to the non-SSL CodeServer. Put the bookmarklets 
in your browser bar.

7.) Visit https://127.0.0.1/sslapp/index.html (or similar) to launch your 
compiled app of step 3.)

8.) Hit the DevMode On bookmarklet, copy the Compile bookmarklet to your 
browser bar as well and then hit compile. Your app should compile, reload 
and fetch your JS from the CodeServer now, through SSL.


The above might contain minor issues, but I guess you get the idea and it 
should generally work.


-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to