Comments (13)
So I would suggest we do the following for ee8/9/10 and beyond:
- look for a
jetty-web-x.y.z.xml
wherex.y.z
matches the executing version (eg12.0.1
)- if not found, look for a
jetty-web-x.y.xml
wherex.y
matches the most significant digits of the executing version (eg12.0
)- if not found, look for a
jetty-web-x.xml
wherex
matches the most significant digit of the executing version (eg12
)- if not found, look for
jetty-web.xml
The environment needs to be there in the name too as key classes have different names.
So the preferential search order would then be:
1 jetty-web-eeN-x.y.z.xml
2 jetty-web-eeN-x.y.xml
3 jetty-web-eeN-x.xml
4 jetty-web-eeN.xml
5 jetty-web-x.y.z.xml
6 jetty-web-x.y.xml
7 jetty-web-x.y.xml
8 jetty-web-x.xml
9 jetty-web.xml
from jetty.project.
Note that items 6 and 7 are dups.
from jetty.project.
Interesting problem.
The quick solution would be to have an alternate named jetty-web.xml
, something like jetty-ee8-web.xml
, which has a priority in lookup in Jetty 12.
But considering that Jetty 10 is now at End of Community Support, why do you need Jetty 10 support still?
from jetty.project.
The quick solution would be to have an alternate named jetty-web.xml, something like jetty-ee8-web.xml, which has a priority in lookup in Jetty 12.
This doesn't exist yet, right? I was indeed looking for something like this :)
But considering that Jetty 10 is now at End of Community Support, why do you need Jetty 10 support still?
First, thanks for the info, I wasn't aware of that!
Till today, the version of Jetty that XWiki supports is Jetty 10 (see https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/ServletContainerSupportStrategy/). The reason is that XWiki was not able to upgrade to 11 since that would have meant removing the javax.servlet.*
namespace and moving to the jakarta.servlet.*
namespace and we're far from being able to do this. This is actually why, when I learnt that Jetty 12 was able to support EE8, that I wanted to see if we could make XWiki run on it and thus be able to support Jetty 12.
What we could do indeed, is only support Jetty 12 on our master branch (ie on our latest releases), and not on our LTS branch (which would still be on Jetty 10). Note: it would be too harsh to our users to ask them to move to Jetty 12 in a heartbeat. However, if we could support both Jetty 10.x and 12.x on all our branches, it would be even nicer.
We could provide several distributions of XWiki for the different Jetty versions, but that's a lot of work and support for us (we are already supporting other servlet engines, DBs, etc and the combination matrix is already bursting ;)).
So, my understanding, is that at this point in time, there's no solution to have a WAR with a jetty-web.xml
be deployable both in Jetty 10.x and 12.x, correct?
Thx @joakime !
PS: When I say "supported version" above it means:
- We have automated tests that execute on that Jetty version, to prove that XWiki works on that Jetty version.
- If there are questions or issues reported for that version, we work on fixing them
- We provide distributions of XWiki on Jetty for that version
from jetty.project.
@vmassol is this the jetty-web.xml
file that your project uses here: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/WEB-INF/jetty-web.xml
Is it only these 2 properties that you need to configure, or is there more?
from jetty.project.
Is it only these 2 properties that you need to configure, or is there more?
@janbartel indeed, there are only 2 properties we need to configure. Is there another way to configure them?
Thanks
from jetty.project.
I submitted PR #11274 as a proof of concept for a possible way to address this.
Would like feedback (@janbartel @vmassol )
from jetty.project.
Thanks @joakime ! Do you think it's better to do it this way rather than add support for a jetty-web-ee8.xml
file for example? I feel that it's a lot less powerful. For example back in Jetty 9.4.x we had to ask users to do the following: https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationJetty/ (and that wouldn't be possible through web.xml
).
Also, imagine we needed to have different values for Jetty 10.x and Jetty 12.x. How would be able to write it? I don't know if it would be possible with jetty.xml
but it seems it could, based on https://www.eclipse.org/lists/jetty-dev/msg02544.html
Last point, it's quite nice to have everything related to jetty located in a single specific file like jetty-web.xml
rather than mix jetty stuff with other stuff in web.xml
(it would also need additional comment to explain it).
WDYT?
Thanks a lot for working on this, really appreciated, and whatever solution you propose will be fine :)
from jetty.project.
@vmassol all good points, and as a result I no longer like that PoC with context attributes.
from jetty.project.
Generally I think that jetty-web.xml
is not a great way to configure anything.... but there are certainly use-cases like this one where it is the best option.
Thus no matter what, I think we should put in a version mechanism for jetty-web[[[-X].Y].Z].xml that will discover multiple files and then use some logic to work out which ones will be run and in which order.
Meanwhile, we should also think of other better ways to do this.
from jetty.project.
Generally I think that
jetty-web.xml
is not a great way to configure anything.... but there are certainly use-cases like this one where it is the best option. Thus no matter what, I think we should put in a version mechanism for jetty-web[[[-X].Y].Z].xml that will discover multiple files and then use some logic to work out which ones will be run and in which order.Meanwhile, we should also think of other better ways to do this.
@gregw I would suggest an algorithm that closely matches what we are already doing with jetty-web.xml
, which is to find a single file to apply based on this logic:
- we look for a
jetty8-web.xml
- if not found we look for a
jetty-web.xml
- if not found we look for a
web-jetty.xml
So I would suggest we do the following for ee8/9/10 and beyond:
- look for a
jetty-web-x.y.z.xml
wherex.y.z
matches the executing version (eg12.0.1
) - if not found, look for a
jetty-web-x.y.xml
wherex.y
matches the most significant digits of the executing version (eg12.0
) - if not found, look for a
jetty-web-x.xml
wherex
matches the most significant digit of the executing version (eg12
) - if not found, look for
jetty-web.xml
from jetty.project.
So I would suggest we do the following for ee8/9/10 and beyond:
- look for a
jetty-web-x.y.z.xml
wherex.y.z
matches the executing version (eg12.0.1
)- if not found, look for a
jetty-web-x.y.xml
wherex.y
matches the most significant digits of the executing version (eg12.0
)- if not found, look for a
jetty-web-x.xml
wherex
matches the most significant digit of the executing version (eg12
)- if not found, look for
jetty-web.xml
The environment needs to be there in the name too as key classes have different names.
from jetty.project.
That would be awesome, thanks everyone!
from jetty.project.
Related Issues (20)
- Servlet spec 6.1 issue 300 HOT 1
- Servlet spec 6.1 issue 316 HOT 1
- Servlet spec 6.1 issue 325 HOT 1
- Servlet spec 6.1 issue 431 HOT 1
- Servlet spec 6.1 issue 453 HOT 1
- Servlet spec 6.1 issue 571 HOT 1
- h2 server responses exceeding SETTINGS_MAX_HEADER_LIST_SIZE do not result in RST_STREAM or GOAWAY
- NativeHelper triggers JDK warning HOT 6
- HTTP requests with large headers are not fully processes and timeout HOT 1
- Cannot invoke "org.eclipse.jetty.client.transport.HttpExchange.getRequest()" because "exchange" is null HOT 1
- replacement for GlobalWebappConfigBinding HOT 3
- Consider adding @NotNull or similar to the code base HOT 11
- After creating the keystore according to the official documentation, executing the following code fails to establish an HTTPS connection when accessed from a web browser. HOT 1
- jetty-ee8-websocket-javax-server export not honoured HOT 2
- HTTP2 async failure on a stream can lead to the connection being aborted HOT 5
- SecureRequestCustomizer() for HTTP3 HOT 1
- Jetty Releases 12.0.10
- Memory leak in `ArrayRetainableByteBufferPool$RetainedBucket` HOT 1
- Define core deployment HOT 8
- README link is broken HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetty.project.