KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > simplevxml > presentation > WelcomePresentation


1 /*
2  * SampleVoiceXML
3  *
4  * Enhydra super-servlet presentation object
5  *
6  * @Copyright 2000 Lutris Technologies, Inc. All Rights Reserved
7  *
8  */

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