-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic appbase #77
Comments
You can override the domain for the Unfortunately this does not appear like it will work for all cases as it assumes HTTP rather than also allowing HTTPS. |
On Wed, Feb 8, 2017 at 4:37 AM, Dan Gravell ***@***.***> wrote:
You can override the domain for the appbase by specifying the system
property -Dappbase_domain. See the code in Application.replaceDomain.
Unfortunately this does not appear like it will work for all cases as it
assumes HTTP rather than also allowing HTTPS.
I just added support for an appbase_override system property which allows
you to completely override the appbase with a new URL. However, I would
still consider having this all-in-one server just generate the correct
getdown.txt and digest files at install time as that's not tremendously
complex and it avoids pushing complexity out to the installer, which must
then ensure that the app is always started with this appropriate system
property in place.
…-- mdb@samskivert.com
|
Thanks for this, sounds good. Regarding getdown.txt and simply writing that... a couple of use cases for
And you can't simply edit |
I use https://github.com/tschulte/gradle-jnlp-plugin/blob/1aad76fe9be351d754b6a98624640f479abbe52d/jnlp-servlet/src/main/java/de/gliderpilot/jnlp/servlet/JnlpFileFilter.java to replace And I created another filter to replace the digest lines for |
Hello guys. The discussion here is not very clear, nor the solution. |
If you want a dynamic appbase, you have two choices. If only the domain of your appbase changes, you can use If you want to change the entire URL then you can pass As to where to apply these system properties, they cannot go into the
You have to include the system property there:
Because the appbase is used to download the getdown.txt file, so the overridden appbase URL must be known before Getdown tries to download the getdown.txt file. Indeed, the This whole appbase override mechanism exists so that a single getdown.txt file can be served from multiple web servers without having to create a custom getdown.txt and digest.txt for each webserver that hosts the app. Again, my recommendation is to create a custom getdown.txt and digest.txt for each webserver that hosts the app (possibly on the fly via a servlet or just pre-generate them, depending on your use case). But that doesn't work for everyone, so we added this somewhat complex additional mechanism to allow the appbase to be overridden. |
My example is not quite accurate. Looking at the code that handles
and it will replace everything up to the first |
Is there a best practice on how to handle system properties like |
So I have an issue/query around this area. Our WebStart model which we are replacing already used Servlet replacement text, so adjusting this for getdown.txt is trivial: appbase = ${__url.path} (we use an Apache-like variable substitution model) But this does throw up a couple of things, which maybe reflects a lack in our understanding on GetDown:
|
OK - so it looks like I can get around the Digester issue with the -Dappbase_override property. Without this I get:
But using the appbase_override it is happy:
Still get a checksum error at launchtime on getdown.txt - but I think I can live with that for now |
Hi
First of all, thank you very much for a great project. We are targeting it as a replacement of current web start solution.
Our "boxed" app is distributed as an all-in-one server app. Then it runs some HTTP server hosting JNLP file and all jars from that JNLP file. Then on workstations the client for the server app is installed through web start with dynamic set up of the application base depending on the current server's IP address/hostname. Please let me know how this can be achieved with getdown?
The text was updated successfully, but these errors were encountered: