|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet janus.web.ConfigServlet
public class ConfigServlet
Servlet zur Konfiguration aller Komponenten.
Dieses Servlet wird automatisch geladen und initialisiert die folgenden Klassen und Systeme:
Log4jConfig
- LoggingkonfigurationPoolConfig
- Verbindungskonfiguration zum HP-NonStop-HostServiceConfig
- Konfiguration der DiensteTimerConfig
- Konfiguration wiederkehrender AbläfeEs können Servlet-Parameter mit den entsprechenden Namen gesetzt werden, um die Konfiguratitonsdateien zu spezifizieren.
Die Standarddateien sind:
log4j.properties
pool.properties
service.properties
timer.properties
Die Dateien werden mit Hilfe des ServletResourceLoader
gefunden und sollten daher im WEB-INF
-Verzeichnis liegen.
Field Summary | |
---|---|
static String |
appServer
Name des Application-Servers |
static String |
documentBase
Der Basis-Pfad der Web-Applikation (z.B. für das Logging) |
static String |
statusUrl
Die URL der Status-Seite |
Constructor Summary | |
---|---|
ConfigServlet()
|
Method Summary | |
---|---|
static void |
configure()
Initialisiere alle Resourcen. |
void |
destroy()
Servlet wird entladen: Stoppe alles |
void |
doGet(HttpServletRequest req,
HttpServletResponse resp)
Damit man auch etwas sieht :-) |
void |
doPost(HttpServletRequest req,
HttpServletResponse resp)
Einzelkonfiguration vom Browser aus. |
static ConfigServlet |
getInstance()
Mache die Instanz global verügbar |
void |
init()
Initialisiere alle Resourcen beim Start. |
boolean |
isUpdateAllowed(HttpServletRequest req)
Darf der Benutzer einen Update durchführen? |
void |
log(String text)
Logging ins Server-Log und in Log4J. |
void |
log(String text,
Throwable t)
Logging ins Server-Log und in Log4J. |
static void |
stop()
Stoppe alle Resourcen. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String appServer
public static String documentBase
public static String statusUrl
Constructor Detail |
---|
public ConfigServlet()
Method Detail |
---|
public static void configure()
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
public static ConfigServlet getInstance()
public void init()
init
in class GenericServlet
public boolean isUpdateAllowed(HttpServletRequest req)
req
- Der Request aus doGet bzw. doPostpublic void log(String text)
log
in class GenericServlet
public void log(String text, Throwable t)
log
in class GenericServlet
public static void stop()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |