When jsp is created, it becomes a servlet on the application server. All logic is executed from the jspService method, all links or variables that you have in jsp become local variables, so by default jsp can be considered thread-safe.
Check out the link to view the jsp life cycle.
In the end, all the code you have in jsp will be in the _jspService method. All the contents of your JSP will be inside.
public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws java.io.IOException, ServletException {
source
share