I'm looking for ways to deploy an application in Payara Micro under a specific context root (ideally an empty context, so the application runs at root).
As far as I know there are two methods:
Use an
.ear
file and specify the context root in the application.xml file:<context-root>/</context-root>
Start Payara Micro and deploy programmatically
PayaraMicroRuntime instance = PayaraMicro.bootstrap(); InputStream is = new FileInputStream("thewar.war") instance.deploy("name", "contextroot", is);
Is there any other way I'm missing? Both versions above are not suitable for me in my current setup.