Threads and the Servlets Generated by JSPs
Whenever a JSP page is accessed on a server it either
As you can likely tell, this generally reduces the overhead on the server involved with running JSP pages when compared to other web-based scripting languages. It also allows for some other capabilities such as making use of multiple threads within the processing.
Tomcat is really a servlet engine (and web server) and essentially just one level away from compiled/executable code. It is still my understanding that another engine named Jasper is used to convert JSP pages into servlets which can then be run by Tomcat. This approach is significantly more efficient than competitor's approaches.
Finding the Generated Servlets. Unfortunately, finding the servlets generated by a JSP page on any given server is not necessarily easy. It definitely took me some time to find them at jasperations.net.
Remember, in general on jasperations.net
In order to make certain you aren't writing over each other's work I have created subdirectories in htdocs for all of our work. This is illustrated in the following snapshot of CuteFTP.
|I shouldn't need to remind you that you each have a
subdirectory based on your last name, and my subdirectory is called
After much searching I found the servlets that are generated by the JSP pages we access. You need to do the following.
Then you should see something like the following.
|The servlets generated by accessing JSPs in your
subdirectories of /htdocs will be in the corresponding subdirectories of
When you move into your subdirectory you should see something like the following.
|You should notice a lot of names that look familiar.
Notice how each of your JSP files has generated both a code file with
the .java extension and a class file. Notice how the names are
We will examine some of these in the next webpage.