So it's tempting to think ESP pages are simply some different flavor of JSP. But they're not. From what I can tell, ESP pages are just server pages that get handed to an EspReader before being served out. The EspReader, in turn, handles the interpretation of scriptlet tags and expression tags (but doesn't compile anything into a servlet). Bottom line, ESP is not JSP, and despite the availability of scriptlets tags, things work quite a bit differently in each case.
But what do you do in ESP? Remember, <sling:defineObjects/> is not available in ESP.
Very similar to the JSP version.
currentNode is the JCR node underlying the current resource; currentSession is what it sounds like, a reference to the current Session object; log refers to the org.slf4j.Logger; reader, I'm not sure about (is it a reference to the EspReader?); request is a reference to the SlingHttpServletRequest; resource is the current Resource; response is, of course, a reference to the SlingHttpServletResponse; and sling is a SlingScriptHelper. All of these are available all the time, throughout the life of any ESP script in Sling.
For more information, try the Sling Javadocs here or Day's page of resources here (note, in particular, the list of References on the right).
perfect explanation about java programming .its very useful.thanks for your valuable information.
Informative article, this is just what I was looking for, thank you!!
Great post! Thanks for sharing. You are providing us a lot of valid information. Keep us updated.