Listing 12.4
Client.html
<HTML>
<BODY>
<H1>RMI AND SERVLETS</H1>
<FORM METHOD="get"
action ="http://localhost:8080/servlet/ClientServlet.class">
<INPUT TYPE="Text" name="username">
<INPUT TYPE="submit" value="Click me">
</FORM>
</BODY>
</HTML>
The source code for this application is over.
Preparing for deployment
Create a directory:
Copy the following files to the "Server"
directory:
- ServerHandlerInterface.class
- ServerHandlerImpl.class
- ServerHandlerImpl_Skel.class
- ServerHandlerImpl_Stub.class
You will deploy the above files on the server machine.
Copy the files to the deployment directory
Copy the "Server" directory into the
web documents directory of web server (JaveWebServer\public_html).
Copy the Client.html file to JaveWebServer\public_html
directory. Copy the following files into the servlets
directory of the web server (JavaWebServer\servlets):
- ServerHandlerInterface.class
- ServerHandlerImpl_Stub.class
- ClientServlet.class
Starting the Java Web Server
c:\JavaWebServer\bin>httpd.exe
Starting the Server Application
c:\JavaWebServer\public_html\Server> java
ServerHandlerImpl
If the server is successfully started, it will print the messages "Creating
server object".
|