InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.2: Developing JSP files >
4.2.2.2: JSP support and environment in WebSphere >
4.2.2.2.4: Batch Compiling JSP files >
4.2.2.2.4.2: Compiling JSP 1.0 files as a batch
4.2.2.2.4.2: Compiling JSP 1.0 files as a batch
To use the JSP batch compiler for JSP 1.0 files, enter the following command
on a single line at an operating system command prompt:
JspBatchCompiler -adminNodeName <node name> [ -serverName <server name> [-application <application name> [-filename <filename>]]] [-keepgenerated <true|false>]
where:
- adminNodeName
This is the name of the node as shown on the Adminstrative Console.
- serverName
[Optional: may only be used if adminNodeName is set] This is the
name of the Application Server in the WebSphere environment on which you
wish to perform this action. Unless you have set up other servers, this
will be "Default Server" [Note that from the command-line, you
will need to include quote marks around the name of the server if that
name comprises two or more words separated by spaces. You do not have
to do this if you use the batchcompiler.config file described below.]
- application
[Optional: may only be used if serverName is set] The name of
a particular web application, should you wish to compile only those JSP
files under that application.
- filename
[Optional: may only be used if application is set] The name of
a single file in the web application you selected above, should you wish
to compile only a single JSP file in an application.
- keepgenerated
[Optional] If set to "yes" this will keep the generated .java
files used for compilation on your server. By default, this is set to
"no" and the .java files are all erased after the class files
have been compiled.
- nameServiceHost
[Optional] If specified, this parameter and the nameServicePort parameter
are used in a Model/Clone environment to designate the hostname and port number of the
Admin Server to be used in accessing the WebSphere Application Server configuration.
- nameServicePort
[Optional] If specified, this parameter and the nameServiceHost parameter
are used in a Model/Clone environment to designate the hostname and port number of the
Admin Server to be used in accessing the WebSphere Application Server configuration.
In lieu of specifying the parameters in a command line, you may specify them
in the batchcompile.config file, located in the WebSphere Application
Server bin directory. No quotation marks are necessary for any of the variables
if you use this file. Any values you enter on the command-line will override
the values specified inthe batchcompile.config file.
Example
Suppose you want to precompile the JSP files associated with the examples
application, shipped with WebSphere Application Server. Issue the following
command in the appserver bin directory:
D:\WebSphere\AppServer\bin>JspBatchCompiler.bat -adminNodeName mynode
-serverName "Default Server" -application examples
You should receive the following response from the server
Server name: Default Server Application Name: examples JSP version: 1.0 docRoot: d:\WebSphere\AppServer\hosts\default_host\examples\web Application Classpath: d:\WebSphere\AppServer\hosts\default_host\examples\servlets; Application output dir: d:\WebSphere\AppServer/temp/default_host/examples URL: .jsp URL: .jsv URL: .jsw Attempting to compile: d:\WebSphere\AppServer\hosts\default_host\examples\web\debug_error.jsp Compilation successful Attempting to compile: d:\WebSphere\AppServer\hosts\default_host\examples\web\HelloHTML.jsp Compilation successful .
.
.
Attempting to compile: d:\WebSphere\AppServer\hosts\default_host\examples\web\StockQuoteWMLRequest.jsp
Compilation successful Attempting to compile: d:\WebSphere\AppServer\hosts\default_host\examples\web\StockQuoteWMLResponse.jsp
Compilation successful
If you look in the appserver temp directory, you should see a directory named
examples. All of the compiled class files for the examples application will
be in this directory.
|
|