jetty.project
jetty.project copied to clipboard
`ServletContext.getResourceAsStream(String)` must use `URLConnection` per Servlet Spec.
Jetty version(s) 12.0.7
Jetty Environment Any
Java version/vendor (use: java -version)
Any
OS type/version Any
Description
Per the Servlet Spec API docs on ServletContext.getResourcesAsStream(String) the returned InputStream must use URLConnection.
The implementation of ServletContext in ee10 / ee9 / ee8 does not use URLConnection.
- Servlet 6 - https://github.com/jakartaee/servlet/blob/6.0.0/api/src/main/java/jakarta/servlet/ServletContext.java#L295
- Servlet 5 - https://github.com/jakartaee/servlet/blob/5.0.0/api/src/main/java/jakarta/servlet/ServletContext.java#L303
- Servlet 4 - https://github.com/jakartaee/servlet/blob/4.0.4/api/src/main/java/javax/servlet/ServletContext.java#L305
I'm not convinced this is a bug, so I've removed that label. We can discuss before proceeding.
I agree this is not an issue. Closing!