getResource getResourceAsStream patch
The Servlet 2.3 specification (and later) states that calls to getResource() and getResourceAsStream() must begin with a "/". SRV.3.5 states:
The getResource and getResourceAsStream methods take a String with a
leading "/" as argument which gives the path of the resource relative to the root of
The current implementation first tries to pass it as given (which seems to often be without a slash), and if that fails adds a slash and tries again. Web containers such as WebSphere return null when passed without a "/" (and generates an error), and so each call turns into 2 calls (as well as filling up the log).
A simple fix is as follows in com.xpn.xwiki.XWiki:
public InputStream getResourceAsStream(String s) throws MalformedURLException
InputStream is = getEngineContext().getResourceAsStream(s);
A better fix would probably be to find the places which do not include the "/" and add it.