01: /*
02: * EncodingSampleApp
03: *
04: * Enhydra super-servlet
05: *
06: */
07:
08: package org.enhydra.encodingsample;
09:
10: import com.lutris.appserver.server.*;
11: import com.lutris.appserver.server.httpPresentation.*;
12: import com.lutris.util.*;
13:
14: /**
15: * The application object.
16: *
17: * Application-wide data would go here.
18: */
19: public class EncodingSampleApp extends StandardApplication {
20:
21: public static String[] encodings = null;
22:
23: /*
24: * A few methods you might want to add to.
25: * See StandardApplication for more details.
26: */
27: public void startup(Config appConfig) throws ApplicationException {
28: super .startup(appConfig);
29: // Here is where you would read application-specific settings from
30: // your config file.
31: try {
32: String[] defaults = { "UTF-8", "ISO-8859-1" };
33: encodings = appConfig.getStrings(
34: "EncodingSampleApp.Encodings", defaults);
35: } catch (ConfigException cex) {
36: }
37: }
38:
39: public boolean requestPreprocessor(HttpPresentationComms comms)
40: throws Exception {
41: return super .requestPreprocessor(comms);
42: }
43:
44: /**
45: * This is an optional function, used only by the Multiserver's graphical
46: * administration. This bit of HTML appears in the status page for this
47: * application. You could add extra status info, for example
48: * a list of currently logged in users.
49: *
50: * @return HTML that is displayed in the status page of the Multiserver.
51: */
52: public String toHtml() {
53: return "This is <I>EncodingSampleApp</I>";
54: }
55: }
|