How can I set things up such that some of my code is run upon starting of all of my JSPs? If possible, can I share what is started with the generated servlets?

Maxim Senin

You can create an alias for your JSPs so that a servlet will be called which later will forward/include your JSPs into its body after doing the pre-processing you need. For example, define an alias
/jsp/ = com.mycompany.myPreprocessingServlet
everything after /jsp/ prefix will be considered file name, so for
servlet will get requestURI=myServletPage.jsp. Its servlet's job to forward request to right path and compute real path with servletContext.getRealPath().