I am using Jetty server for for my web application. does jetty always expand a war file on server start? if not the how can i make it do so? lets say after first time start/deployment, now if i replace the war file to an old war file, jetty does not expand old war file.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
By default, Jetty always expands WAR files.
You can configure it to not expand by using the
extractWAR
in your advanced configuration descriptor file.However, what I think you are actually asking about, is how does the web app / servlet spec temp directory logic work?
The tempDirectory used by Jetty is determined by a number of factors, mostly dictated by the servlet spec. See prior answer about the topic of tempDirectory configuration for details.
When the temp directory is unspecified / unconfigured a new temp directory is created using the following rough syntax.
The temp directory used is persisted, meaning it is not deleted on server shutdown. The temp directory is used to unpack the WAR into when the WAR file (or context deployable XML) is determined to be newer than the content in the persisted temp directory.
Starting with Jetty 9.1, there is now a
WebAppContext.setPersistTempDirectory(boolean)
that can be used to turn off the temp directory persistence.