Datasheet

Patrick c01.tex V3 - 09/18/2009 12:15pm Page 30
Chapter 1: Building Web Applications in WebLogic
Viewing Generated Servlet Code
Viewing the servlet code generated for a particular JSP page can be instructive while learning JSP tech-
nology and useful during the testing and debugging process. Often the error report received during the
execution of the JSP page indicates the line in the generated servlet code, but finding the JSP scriptlet
code or tag that caused the error requires inspection of the Java code.
Generated Java servlet code will be kept alongside the generated servlet class files if the
keepgenerated
parameter is set to
true
in the
<jsp-descriptor>
section of the
weblogic.xml
descriptor file. The equiv-
alent option for keeping the generated Java code for JSP pages compiled using the
weblogic.appc
utility
or
wlappc
Ant task is
keepgenerated
placed on the command line or within the Ant task invocation.
By default, the generated servlet classes and Java code will be placed in a temporary directory struc-
ture located under the domain root directory. The name of this temporary directory depends on the
names of the server, enterprise application, and web application, and it typically looks something like
servers/myserver/tmp/_WL_user/_appsdir_myapp_dir/wx8qxk/jsp_servlet
. This default location
may be overridden using the
<working-dir>
option in the
weblogic.xml
descriptor file.
Chapter Review
In this chapter we reviewed the key concepts related to web applications in WebLogic Server and pre-
sented a number of important best practices designed to improve the quality and performance of your
web applications.
Most of this chapter has been at the detailed design and implementation level, the trees, in a sense. In the
next two chapters we step back and look at the forest for a few minutes by examining the importance of
the overall web application architecture, the selection of a suitable presentation template technique, and
the application of a model-view-controller pattern and framework for form and navigation handling.
30