Database Reference
In-Depth Information
JSP Page Request
JSP
Servlet
Current?
Parse JSP and
Create Java
Source File
No
Yes
Compile Java
Source File
JSP
Servlet in
Memory?
Yes
No
Load the JSP Servlet
Execute the JSP
Servlet
Figure 11-22
JSP Compilation Process
JSP Page Response
By ThE WAy The downside of such automatic compilation is that if you make syntax
errors and forget to test your pages, the first user to access your page will
receive the compiler errors!
Unlike common gateway interface (CGI) files (see: http://en.wikipedia.org/wiki/
Common_Gateway_Interface ) and some other Web server programs, only one copy of a
JSP page can be in memory at a time. Further, pages are executed by one of Tomcat's
threads, not by an independent process. This means that much less memory and pro-
cessor time are required to execute a JSP page than to execute a comparable CGI script.
Web Database Processing with PhP
At this point in our discussion, it is time to build an actual Web database application and apply
both some of the knowledge from this chapter and some new techniques yet to be discussed.
We have already created an ODBC data source for the View Ridge Gallery database, and now
we will use it to look at Web database processing. Although we have introduced technologies
such as ADO.NET, ASP.NET, Java, and JSP, these technologies are complex subjects and beyond
the scope of this topic. Further, these technologies tend to become vendor specific—you are
either working in a Microsoft-centric world with .NET technologies and ASPs or an Oracle
Corporation-centric world with Java and JSPs.
By ThE WAy Before working your way through this chapter, you should install and set
up the software we will be using—the Microsoft IIS Web server, the Java
JRE, PHP, and the Eclipse PDT IDE—on your computer if you do not have the soft-
ware available for your use in a computer lab or similar facility. Installing and setting
up this software correctly, which is complex but straightforward, is described in detail
in Appendix I. We strongly suggest that you read Appendix I now and make sure your
computer is completely set up before continuing with the material in this chapter. Then
try out each of our examples on your computer to get the most out of this discussion.
 
 
 
Search WWH ::




Custom Search