KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > pim > Enhydrapim


1 /*
2  * enhydrapim
3  *
4  * Enhydra super-servlet
5  *
6  */

7
8 package org.enhydra.pim;
9
10 import org.enhydra.pim.spec.SpecUtil;
11
12 import com.lutris.appserver.server.ApplicationException;
13 import com.lutris.appserver.server.StandardApplication;
14 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
15 import com.lutris.util.Config;
16 import com.lutris.util.ConfigException;
17
18 /**
19  * The application object.
20  *
21  * Application-wide data would go here.
22  */

23 public class Enhydrapim extends StandardApplication {
24
25     /*
26      * A few methods you might want to add to.
27      * See StandardApplication for more details.
28      */

29     public void startup(Config appConfig) throws ApplicationException {
30         super.startup(appConfig);
31         // Here is where you would read application-specific settings from
32
// your config file.
33
boolean useEjb=false;
34         try {
35             useEjb = appConfig.getBoolean("Enhydrapim.UseEjb",false);
36         }catch(ConfigException cex) {
37             cex.printStackTrace();
38         }
39         SpecUtil.useEjb(useEjb);
40     }
41     public boolean requestPreprocessor(HttpPresentationComms comms)
42                    throws Exception JavaDoc {
43         return super.requestPreprocessor(comms);
44     }
45
46     /**
47      * This is an optional function, used only by the Multiserver's graphical
48      * administration. This bit of HTML appears in the status page for this
49      * application. You could add extra status info, for example
50      * a list of currently logged in users.
51      *
52      * @return HTML that is displayed in the status page of the Multiserver.
53      */

54     public String JavaDoc toHtml() {
55         return "This is <I>EnhydraPim</I>";
56     }
57 }
58
59
Popular Tags