Jeeves

Example Servlets

These are a set of sample servlets that run with the Jeeves server. If you're reading this from our website, as opposed to on your own Jeeves server, none of the links on this page (except the source) will work. To see what these servlets do, download a copy of the Jeeves server (with documentation), run it, and bring up http://(your.server)/doc/servlet_tutorial/examples.html .

Simple Servlet

This servlet outputs a very simple HTML page.

Try it, Source

Snoop Servlet

A simple "echo" servlet, which displays the arguments it recieves.

Try it, Source

Phone Servlet

This servlet loads a list of phone numbers from a file specified as an intialization parameter. Upon request, it will return a particular person's phone number if their name is specified in the query string, otherwise it will return the entire list.

Try it, Source

Counter Servlet

This servlet uses cookies to maintain a persistant counter.

Try it, Source

Fun Servlet

This servlet simply outputs an html page with an embeded applet. To demonstrate basic authentication scheme, this servlet is protected by an ACL (user jeeves and password jeeves).

Try it, Source

Date Servlet

This servlet outputs the current date and time in plain text format, suitable for embedding in an existing html document as a server-side include.

Try it, Server Side Include Example, Source

Hello World Servlet

This is an another simple servlet which outputs a simple html document. However, it is not loaded by default when Jeeves starts up. To load it, do the following:
1. Save this page in your browser;
2. Go to the URL http://<server>/admin/admin.html
3. Log in to the administration applet with admin/admin as the username/password;
4. Once logged on, choose "Servlet Loading" from the Sections Panel;
5. Enter "hello" as the Servlet Name;
6. Enter "HelloWorldServlet" as the Class Name;
7. Press the Add Button;
8. Return to this page.
Then the servlet can be accessed by the URL http://<server>/servlet/hello

Try it, Source

Finger Servlet

This servlet acts as a simple gateway for the finger protocol.

Username:
Hostname: multiple hostnames may be separated by commas
Verbose:
, Source