In this section you will take a quick look at the compiling tools available in the WebLogic Server. Since the primary compiler is the javac compiler of the Java Development Kit (available along with the WebLogic Server), the javac compiler will not be discussed. Instead, the compilers provided to compile JavaServer Pages and Enterprise JavaBeans will be covered. These are the weblogic.jspc and weblogic.ejbc compilers. weblogic.jspc JavaServer Pages (JSPs), as you are now aware, are compiled automatically by the WebLogic Server internally. The developer is not required to compile the JSPs explicitly. The compiler used by the WebLogic Server to compile JSPs is the weblogic.jspc tool, which parses the JSPs for any syntax errors and prints them on the screen if it encounters any such errors. After a successful parsing, weblogic.jspc generates the target Java servlet and then compiles the JSP's Java servlet to a .class file. This Java servlet is then loaded by the WebLogic Server to perform processing. The options of the weblogic.jspc compiler are listed in Table 19.1. Table 19.1. weblogic.jspc options Option flag | Description | -help | Print this help message. | -version | Print version information. | -webapp <directory> | Directory to be considered as the document root for resolving relative files. | -compileFlags <flags> | Specify nonstandard options to the Java compiler (those other than -g -nowarn and so on), for example, -compileFlags "+E -otherOpt +P". | -verboseJavac | Whether to invoke the Java compiler with verbose mode (default false, use -verbose, also). | -compileAll | Compile all .jsp files below the directory specified by -webapp. | -depend | Only compile files that are out of date (source .jsp file(s) newer than generated .class file). | -debug | Add JSP line numbers to generated class files to aid debugging. | -k | Continue compiling files, even when some fail. | -noTryBlocks | Disable use of try/finally blocks for BodyTag extensions. Improves code for deeply nested tags. | -keepgenerated | Keep the generated .java files. | -compiler <javac> | Java compiler to use. | -g | Compile debugging info into class file. | -O | Compile with optimization on. | -d <dir> | Target (top-level) directory for compilation. | -package <packageName> | The package into which the .jsp files should be placed. | weblogic.ejbc After processing, the weblogic.ejbc tool generates the resultant stub, skeleton, and helper class files packaged in either a Java archive file (.jar) or the path of the directory where you want the stub, skeleton, and helper class files as follows: java weblogic.ejbc [options] <source directory or jar file> [<target directory or jar file>] The options of the weblogic.ejbc compiler are listed in Table 19.2. Table 19.2. weblogic.ejbc options Option flag | Description | -help | Print this help message. | -version | Print version information. | -idl | Generate IDL for remote interfaces. | -idlOverwrite | Always overwrite existing IDL files. | -idlVerbose | Display verbose information for IDL generation. | -idlNoValueTypes | Do not generate valuetypes and methods/attributes that contain them. | -idlFactories | Generate factory methods for valuetypes. | -idlVisibroker | Generate IDL somewhat compatible with Visibroker 4.1 C++. | -idlDirectory <dir> | Specify the directory where IDL files will be created (default: target directory or jar). | -iiop | Generate CORBA stubs. | -iiopDirectory <dir> | Specify the directory where IIOP stub files will be written (default: target directory or jar). | -idlMethodSignatures <> | Specify the method signatures used to trigger IDL code generation. | -forceGeneration | Force generation of wrapper classes. Without this flag, the classes may not be regenerated if it is determined to be unnecessary. | -basicClientJar | Generate a client jar that does not contain deployment descriptors. | -keepgenerated | Keep the generated .java files. | -compiler <javac> | Java compiler to use. | -g | Compile debugging info into class file. | -nowarn | Compile without warnings. | -verbose | Compile with verbose output. | -deprecation | Warn about deprecated calls. | -normi | Passed through to Symantec's sj Java compiler. | -classpath <path> | Classpath to use during compilation. | |