Super Dev Mode on a remote server
Asked Answered
C

2

5

The project I work at is quite specific. We use GWT with SAP backend. We run the Dev Mode using the following configuration (as program arguments; I run the project directly using IntelliJ IDEA)

-noserver -logLevel INFO -startupUrl http://server-url:8000/aaa -whitelist ^http[:][/][/]server-url[.]eu[:]8000/aaa com.company.project.main.Main

Note, we didn't use a local server (-noserver).

After familiarizing myself with the Super Dev Mode, I understood, that it works similar to GWT Web Mode, i.e. it compiles JavaScript (the folder to compile to can be specified) and then runs the code server with that script hosted.

Due to the specifics of the project, the compiled JavaScript is deployed to the remote server using maven via WebDav. So simply specifying -workDir as a parameter will not deploy the scripts on the remote server. Nor can we run (at least at the moment) a Java server on the server-url address.

Can we use the Super Dev Mode in this situation?

Cypriot answered 12/12, 2012 at 13:55 Comment(0)
C
9

Yes you can.

EDIT 2016-11-27: I built a devserver that can use -launcherDir-style SuperDevMode without the need to write to the server, by using a webpack-like proxy: https://github.com/tbroyer/gwt-devserver

EDIT: there are a few issues re. deferred-binding properties. The recommended use of SDM (since GWT 2.7) is to use -launcherDir which means using a local server.

SuperDevMode works much like DevMode with -noserver, which means you have to deploy your app at least once to your server. In the case of SuperDevMode, it means you have to compile and deploy with the xsiframe linker and devModeRedirectEnabled property set to true.

Then you run SuperDevMode on your machine, create your bookmarklets if not done already, load your app from the remote server and click the Dev Mode On bookmarklet.

This will store something in the browser's sessionStorage so that reloading the page will now load the permutation from the SuperDevMode running on your machine rather than the remote server.

More info about how SuperDevMode works: http://blog.ltgt.net/how-does-gwts-super-dev-mode-work/

Companionway answered 12/12, 2012 at 14:51 Comment(3)
But which which parameters should I run the Super Dev Mode? Shoul I specify it as -bindAddress server-url -port 8000? If I do that I get java.net.BindException: Cannot assign requested address and a warning failed SelectChannelConnector@server-url:8000.Cypriot
The answer is correct, it is possible. However, I had to run the SuperDevMode with the -bindAddress 0.0.0.0. Then I opened the offered link http://victor-dell:9876, where I could drag the bookmarklets. The next step was to open my http://server-url:8000/aaa and then click the "Dev Mode On" bookmarklet. I can also skip going to http://victor-dell:9876 once I have those bookmarklets.Cypriot
Without the -bindAddress then you can simply access the codeserver at localhost or 127.0.0.1, and it should all work the same.Companionway
C
0

For now, I see only one possible solution, which is to run the gwt-codeserver.jar somehow on the SAP server (with the address, say, http://server-url:8000/bbb) and write a servlet, that will redirect all requests to http://server-url:8000/aaa. However, this is not very easy to implement. The SAP server has "tricky" authentication mechanism, where user first sees the logon page and then they are redirected to a generated session-specific URL.

Other ideas are very welcome.

Cypriot answered 12/12, 2012 at 13:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.