ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/program/servcomp.htm

44 lines
1.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Compile the servlet</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h5><A NAME="servcomp"></A>Compile the servlet</h5>
<p>After you have written the source code (.java file) for your servlet, you must compile it into a .class file before you can package it for and deploy it on your iSeries server.</p>
<p><strong>Compiling code on the iSeries server</strong></p>
<p>Perform these steps to compile the ServletSample code:</p>
<ol type="a">
<li>Start Qshell. On the iSeries command line, type <tt>STRQSH</tt> and press the <strong>Enter</strong> key. The <strong>QSH Command Entry</strong> screen displays. When the <strong><tt>$</tt></strong> prompt displays, Qshell is ready for commands.</li>
<li>Use the cd command to change the current directory to the directory that holds your servlet source code. On the Qshell command line, type:
<pre>
cd /<em>path_to_mydir</em></pre>
<p>where /<em>path_to_mydir</em> is the fully qualified path name of your directory, and press <strong>Enter</strong>.</p></li>
<li>Compile your servlet.
<p>On the QSH command line, type:</p>
<pre>
javac <em>my_servlet_name</em>.java</pre>
<p>where <em>my_servlet_name</em> is the name of your servlet, and press the <strong>Enter</strong> key.</p></li>
</ol>
<p>Alternatively, you can compile your servlet code using WebSphere Development Studio Client. For more information, see the WebSphere Development Studio Client Help.</p>
</body>
</html>