Roughly speaking jndi connections on Geoserver + Jetty can be achieved by:
1) Add plus.mod and jndi.mod files (+ required jars in jetty lib). Which I did by hand (copypasting from the official Jetty distribution). 2) Include the loading of these modules in start.ini. 3) And then the rest was simply declaring the connection in WEB-INF/jetty-env.xml and a resource-ref in WEB-INF/web.xml
and then after GeoServer restart I was able to access a PG database on localhost through the JNDI connection. A bit more verbose walkthrough at gs-jetty-jndi-walkthrough.txt
Now I can condense the third step to a docs/tutorial page similar to Setting up a JNDI connection pool with Tomcat, but could/should the first two maybe be resolved by including the necessary files already during the binary build? Of course this can be hand managed by users actually requiring the functionality but looking at the plus/jndi mod files over the more recent Jetty versions it seems that their dependencies change so there's going to be a gotcha that will depend on the specific version of Jetty GeoServer is packaged with.