jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Issue #11266 - allow context attributes to be used to configure max form (content size / keys)

Open joakime opened this issue 1 year ago • 9 comments

Replacement of PR #11274

  • Allows these common configurations to be set via WEB-INF/web.xml without the need for a WEB-INF/jetty-web.xml

joakime avatar Jun 10 '24 12:06 joakime

@janbartel is this approach acceptable?

This PR is currently draft, as I still need to write some documentation and new unit tests for these new techniques.

joakime avatar Jun 10 '24 12:06 joakime

I'm not sure we need to do this now that we can accommodate all different environment versions of WEB-INF/jetty-web.xml and even a general way to apply an environment specific context xml file to every deployment to that environment.

I have no idea what you are referencing.

The documentation, and the code do not show alternate jetty-web.xml behaviors on the jetty-12.0.x branch.

joakime avatar Jun 13 '24 14:06 joakime

I'm not sure we need to do this now that we can accommodate all different environment versions of WEB-INF/jetty-web.xml and even a general way to apply an environment specific context xml file to every deployment to that environment.

This was discussed at https://github.com/jetty/jetty.project/issues/11266#issuecomment-1892825054 but I'm not sure it's been implemented already. If it has then that's awesome as I could use it on XWiki (we're still stuck ATM).

Thx

vmassol avatar Jun 13 '24 14:06 vmassol

@joakime @vmassol it's been implemented in the jetty-12.1.x branch. I guess if there's interest it could be backported to jetty-12.0.x, but we will be switching to jetty-12.1.x in the nearish future anyway (because servlet 6.1).

janbartel avatar Jun 14 '24 00:06 janbartel

I forgot we already had an issue for backporting the new environment specific jetty-web.xml and jetty-env.xml files: https://github.com/jetty/jetty.project/issues/11774

janbartel avatar Jun 26 '24 21:06 janbartel

@janbartel cool, thx. I hope that Jetty 12.1 will be released soon or that a 12.0.x release with https://github.com/jetty/jetty.project/issues/11774 will be done soon :) Right now we're stuck on Jetty 10 (as XWiki cannot move to jakarta EE yet), which is why we're keen to move to Jetty 12.x. Thx again

vmassol avatar Jun 27 '24 08:06 vmassol

@vmassol 12.0.11 should be around soon (we hope mid/late next week)

olamy avatar Jun 27 '24 09:06 olamy

Great, thanks Olivier! :) (I hope it'll contain https://github.com/jetty/jetty.project/issues/11774 which is still open ATM)

vmassol avatar Jun 27 '24 11:06 vmassol

@janbartel @joakime @olamy Actually I'm not sure if this issue will help us since our problem is the ability to deploy the same XWiki WAR to work both in Jetty 10 and 12 (see https://github.com/jetty/jetty.project/issues/11266).

AFAIU the code from this issue just adds a new way to configure jetty through web.xml and thus this way is not present in Jetty 10.x, right?

OTOH implementing https://github.com/jetty/jetty.project/issues/11266#issuecomment-1893120325 would work since it's backward-compatible (Jetty 10 would use jetty-web.xml and Jetty 12 would use jetty-web-xxx.xml).

Or do you plan to backport the ability to configure Jetty from web.xml also in Jetty 10?

Thx

vmassol avatar Jun 27 '24 12:06 vmassol

@vmassol no, we're not backporting any changes like this to jetty-10, so you're correct that the way to go in jetty-12.0 and beyond is to use the features in https://github.com/jetty/jetty.project/pull/11966 to make an ee specific jetty-web-eeX.xml file (and just continue to use jetty-web.xml as-is in prior releases).

janbartel avatar Jul 09 '24 00:07 janbartel