Sun Java Solaris Communities My SDN Account Join SDN
 
Tutorials & Code Camps

Hosting with servletrunner

 

Training Index


[Help | Solution | API Docs | Expected Output | Course Notes | Magercises | Module Intro]

Skeleton Code

This Magercise shows how to create a very simple servlet, how to host this servlet with the help of the servletrunner utility, and how to invoke the servlet from a browser. In this exercise, all of the code has been written for you.

To review the course material for this exercise go to the course notes.

Perform the following tasks:

1. Compile the HelloWorldServlet.java file using your favorite Java compiler.

2. Run servletrunner to host your servlet.

3. Activate the servlet from your browser by typing the URL

   http://localhost:8088/servlet/HelloWorldServlet
into your browser.

The task numbers above are linked to the step-by-step help page. Also available is a complete solution to the problem, and a demonstration of the expected behavior.

When you finish this Magercise you will have compiled and run a simple servlet that creates a custom HTML page and displays it in a browser.

Copyright © 1998 MageLang Institute. All Rights Reserved.