title: How to add a custom VariableResolver in pure JSP
body: <p>I'd wish to programmatically add a custom VariableResolver when JSF or anything like that is not used, so that before seeking for beans in scopes as mentioned in <a href="https://stackoverflow.com/questions/1979624/how-to-add-custom-variableresolver-to-jsp-context-in-jsp-2-0-to-support-special-e">1</a>, the EL would first try to resolve variables within it.</p>
  
  <p>The goal is to make objects in the database available in EL right by their names, and there could be a lot of them to put into some scope.</p>
  
  <p>Right now I put a special bean into the session scope under the name, say, 'z', and that bean extends Map interface and thus lets access the objects with expressions like ${z.address}, ${z.fullName}. I'm trying to eliminate that 'z'.</p>
  
  <p>Better if I manage to insert my resolver in a Filter (sure i'll check not to do this multiple times for every web request)</p>
  
  <p>(Edit: maybe I am talking about ELContext, how to put there my own VariableMapper or ELResolver or something like this)</p>