Search code examples
jspobjectsingletonimplicit

JSP implicit objects are Singleton objects?


I am very keen to know about JSP's implicit objects implementation. My simple question is that are they Singleton objects?


Solution

  • They are constant field values. See https://tomcat.apache.org/tomcat-7.0-doc/jspapi/javax/servlet/jsp/PageContext.html and
    https://tomcat.apache.org/tomcat-7.0-doc/jspapi/constant-values.html
    Also, if you are using Tomcat, then look in its work folder at a translated file. You will see their creation in the _jspService method.