01: package chat.presentation;
02:
03: // Standard imports
04: import java.io.IOException;
05:
06: // Enhydra SuperServlet imports
07: import com.lutris.appserver.server.httpPresentation.HttpPresentation;
08: import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
09: import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
10: import com.lutris.util.KeywordValueException;
11:
12: import chat.ChatApplication;
13:
14: public class ChatPresentation implements HttpPresentation {
15:
16: private static ChatHTML chat;
17:
18: public void run(HttpPresentationComms comms)
19: throws HttpPresentationException, IOException {
20: try {
21: getTitle(comms);
22: } catch (Exception e) {
23: e.printStackTrace();
24: }
25: }
26:
27: static public void getTitle(HttpPresentationComms comms)
28: throws Exception {
29: ChatApplication myApp = (ChatApplication) comms.application;
30:
31: chat = (ChatHTML) comms.xmlcFactory.create(ChatHTML.class);
32: chat.setTitle(myApp.getRoomName());
33: comms.response.writeDOM(chat);
34:
35: }
36:
37: }
|