Listing 4. FooPresentation.java

/*
 *  myproject
 *
 *  Enhydra super servlet presentation object
 *
 */
package il.co.lerner.presentation;
// Enhydra SuperServlet imports
import com.lutris.appserver.server.httpPresentation .HttpPresentation;
import com.lutris.appserver.server.httpPresentation .HttpPresentationComms;
import com.lutris.appserver.server.httpPresentation .HttpPresentationException;
// Standard imports
import java.io.IOException;
import java.util.Date;
import java.text.DateFormat;
public class FooPresentation implements HttpPresentation {
   public void run(HttpPresentationComms comms)
       throws HttpPresentationException, IOException {
       // Send the content type to the user's browser
       comms.response.setContentType("text/html");
       // Print some HTML
       comms.response.writeHTML("<HTML>");
       comms.response.writeHTML("<Head> <Title>Foo</Title></Head>");
       comms.response.writeHTML("<Body>");
       comms.response.writeHTML("<P>Foo</P>");
       comms.response.writeHTML("</Body>");
       comms.response.writeHTML("</HTML>");
   }
}