FAQ
Here are some frequently asked questions about using Javelit. If you can't find any answer to your question here, please open an issueor open a discussion thread in the Github project.
jbang app install --fresh --force javelit@javelit
jbang app install --force io.javelit:javelit:0.76.0:all@fatjar
Javelit expects to be served at the root "/" of a domain. This is important for the websocket, media and page urls.
If Javelit is served behind a proxy on a sub-path, for instance example.com/behind/proxy:
- if the proxy sets the
X-Forwarded-Prefixheader, Javelit will work with no additional configuration - if the header above is not set, you need to pass the
--base-pathflag manually:- Standalone, in Javelit CLI:
javelit run --base-path=/behind/proxy .... - Embedded, programmatically:
Server.builder(...).basePath("/behind/proxy").build().
- Standalone, in Javelit CLI:
If --base-path is set and you need to access the app on localhost directly (not behind the proxy) pass the ?ignoreBasePath=true query parameter.
Example: localhost:8080/?ignoreBasePath=true.
In dev mode, the browser automatically opens with ?ignoreBasePath=true.
Dark mode - as in switching between light and dark mode - is not supported yet.
You can pass your own custom theme as an .html file through custom headers.
javelit run --headers-file custom_theme.html YourApp.java
Or embedded:
Server.builder(....).headersFile(<Path to custom_theme.html>).build().start();
You can find example of custom themes in this folder. If you wish to make an LLM generate a custom theme, provide the original theme as input.
For more info, join the discussion in this thread.
Still have questions?
Go to our discussions forum for helpful information and advice from Javelit experts.