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.
Compiling code on the iSeries server
Perform these steps to compile the ServletSample code:
cd /path_to_mydir
where /path_to_mydir is the fully qualified path name of your directory, and press Enter.
On the QSH command line, type:
javac my_servlet_name.java
where my_servlet_name is the name of your servlet, and press the Enter key.
Alternatively, you can compile your servlet code using WebSphere Development Studio Client. For more information, see the WebSphere Development Studio Client Help.