Replies: 4 comments 8 replies
-
|
I don't follow what you are asking specifically for? We have several deployers already ...
Keep in mind that each deployment exists on it's own You cannot have two |
Beta Was this translation helpful? Give feedback.
-
|
I'm asking for a way to not having to create a properties file (https://jetty.org/docs/jetty/12.1/operations-guide/deploy/index.html#web-application-format-static) to disable dir listing for every static app that I deployed to the same context (e.g. "/"). I guess this is doable only with static app because I don't need to separate each static app into its own context. In this case, the "folder" itself serves as a distinct path for the app already and all of them behave the exact same way (which basically just renders the static content). To be very specific, I'm asking for a way to provide a custom version of this: |
Beta Was this translation helpful? Give feedback.
-
|
Yes, this is exactly what I'm looking for and much easier than I expected. Thank you so much. I had no idea that the properties file is environment specific as well and not just application specific.
On Friday, March 13, 2026 at 06:31:29 PM EDT, Joakim Erdfelt ***@***.***> wrote:
Ah, this is easy, far easier than you suspect.
Create a ${jetty.base}/environments/static.properties
Put any line you want all deployments to the static environment to apply.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure what I did wrong but I created a It only works if I created an Is it possible that the environment-based configuration doesn't work with the embedded server and static environment using the staticapp.jar? Please advise. Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Jetty version
12.1.7
Jetty Environment
static
Enhancement Description
Hi,
As shown in the examples seen here https://jetty.org/docs/jetty/12.1/programming-guide/server/deploy.html, there is not an easy way to configure a specific environment's context for something like the static deployer. I understand that we have the option to override the StaticAppContext and provide our own setting such as the "dirAllowed" property for the entire server (and not just a specific application via the "app.properties" file). However, that would require us to create our own jar and add it to the classpath.
I wonder if it is possible to provide a more flexible option create the environment dynamically using our own custom StaticAppContext without having to deal with ClassLoader and what not? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions