KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > chat > presentation > ChatPresentation


1 package chat.presentation;
2
3 // Standard imports
4
import java.io.IOException JavaDoc;
5
6 // Enhydra SuperServlet imports
7
import com.lutris.appserver.server.httpPresentation.HttpPresentation;
8 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
9 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) throws HttpPresentationException, IOException JavaDoc {
19     try{
20       getTitle(comms);
21     }catch(Exception JavaDoc e){
22       e.printStackTrace();
23     }
24   }
25
26   static public void getTitle(HttpPresentationComms comms) throws Exception JavaDoc {
27     ChatApplication myApp = (ChatApplication) comms.application;
28
29     chat = (ChatHTML)comms.xmlcFactory.create(ChatHTML.class);
30     chat.setTitle(myApp.getRoomName());
31     comms.response.writeDOM(chat);
32
33   }
34
35 }
36
37
38
39
Popular Tags