I need to run Jetty, specify war-file and have it unpacked by Jetty into specific location. The common behavior of Jetty is to take TEMP directory or JETTY_HOME/work directory and unpack war-file into a sub-folder named like this: jetty-HOST-PORT-CONTEXT.war-_-any-
This is absolutely inappropriate for our environment because the PORT part is random. War-file must be unpacked by Jetty and the destination must be 100% flexible.
Is it possible? Please advice. Jetty isn’t my area of expertise, forgive me if the question is lame or trivial, however googling didn’t help much.
Thank you very much!
Thank you everyone. I’ve managed to achieve the requirement extending Jetty with the following code:
app.setTempDirectory call makes Jetty unpack war-file into custom folder. I’ve not found any other way but the solution suits me right.