Since a JSP file is largely HTML code with a little Java or some JSP Tags thrown in, it will begin its lifecycle -- after, perhaps, creation in an HTML or special JSP editor -- in a server location where conventional HTML pages are/may be located. For many servers, that location is often directly below a top-level project root, such as ABJSP in the figure, below. What is placed there is the "raw" JSP file.
When the server accesses that file for the first time, through a URL of the form
http://host:port/ABJSP/login.jsp
it invokes a special JSP transformation program that processes the login.jsp file, transforms it into a servlet, and places (usually) both the .java and .class files in a subdirectory under a special server work directory. In effect, what the transformation does is convert the HTML portions of the file into println statements and removes the special surrounding tags from the Java portions, leaving them as "bare" Java code. In this example, those special files derived from login.jsp are named login_jsp.java and login_jsp.class.
Such transformations are done the first time the JSP file is referenced or the first time a newly updated version of the file is referenced. Thereafter, the server bypasses both the original JSP file and the transformation step, and, instead, directly invokes the derived JSP servlet.
For completeness, the figure, below, also shows a source folder and a WEB-INF/classes folder structure, both directly below the project folder. They might contain, for example, the source and compiled versions of a ControlLogin class that could processes input obtained from the JSP login View component.