KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hamletsoft > enhydra > cactus > presentation > WelcomePresentation


1 /*
2  * cactus
3  *
4  * Enhydra super-servlet presentation object
5  *
6  * 2001 Ryuji "The Hamlet" Hattori. all right reserved
7  *
8  *
9  * formatted with JxBeauty (c) johann.langhofer@nextra.at
10  */

11
12
13 package org.hamletsoft.enhydra.cactus.presentation;
14
15 // Enhydra SuperServlet imports
16
import com.lutris.appserver.server.httpPresentation.HttpPresentation;
17 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
18 import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
19 // Standard imports
20
import java.io.IOException JavaDoc;
21 import java.util.Date JavaDoc;
22 import java.text.DateFormat JavaDoc;
23
24
25 public class WelcomePresentation
26     implements HttpPresentation {
27
28   public void run (HttpPresentationComms comms) throws HttpPresentationException,
29       IOException JavaDoc {
30     WelcomeHTML welcome;
31     String JavaDoc now;
32     welcome = (WelcomeHTML)comms.xmlcFactory.create(WelcomeHTML.class);
33     now = DateFormat.getTimeInstance(DateFormat.MEDIUM).format(new Date JavaDoc());
34     welcome.getElementTime().getFirstChild().setNodeValue(now);
35     comms.response.writeDOM(welcome);
36   }
37 }
38
39
40
41
Popular Tags