01: /*
02: * SampleVoiceXML
03: *
04: * Enhydra super-servlet presentation object
05: *
06: * @Copyright 2000 Lutris Technologies, Inc. All Rights Reserved
07: *
08: */
09:
10: package simplevxml.presentation;
11:
12: import simplevxml.*; // Enhydra SuperServlet imports
13: import com.lutris.appserver.server.httpPresentation.HttpPresentation;
14: import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
15: import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
16: import com.lutris.appserver.server.httpPresentation.HttpPresentationOutputStream;
17: import com.lutris.appserver.server.httpPresentation.HttpPresentationResponse;
18:
19: // Standard imports
20: import java.io.IOException;
21: import java.util.Date;
22: import java.text.DateFormat;
23:
24: public class WelcomePresentation implements HttpPresentation {
25:
26: public void run(HttpPresentationComms comms)
27: throws HttpPresentationException, IOException {
28:
29: WelcomeVoiceXML welcome;
30: String now;
31: welcome = (WelcomeVoiceXML) comms.xmlcFactory
32: .create(WelcomeVoiceXML.class);
33: now = DateFormat.getTimeInstance(DateFormat.SHORT).format(
34: new Date());
35: welcome.setTextTime(now);
36: comms.response.writeDOM(welcome);
37:
38: }
39:
40: }
|