Mittwoch, 28. März 2012
Tomcat und Location der log4j.xml
Die Location der log4j.xml kann über ein System-Property gesetzt werden. Dazu wird ein Eintrag in der bin/setenv.sh erstellt:

JAVA_OPTS="$JAVA_OPTS -Dlog4j.configuration=file:$CATALINA_HOME/conf/log4j.xml"

... link (0 Kommentare)   ... comment


Donnerstag, 14. Januar 2010
Tomcat 5 startet Web-Applikation direkt aus dem Eclipseprojekt Output Folder
Wie kann man in Tomcat 5 eine Web-Applikation konfigurieren, deren Dateien in einem beliebigen Verzeichnis (z.B. das Build Output Folder eines Eclipse Projekts) liegen?

Im Verzeichnis <tomcat-home>/conf/Catalina/localhost/ eine neue XML-Datei anlegen. Der Dateiname ensprechend dem Name der Web-Applikation wählen. Die XML-Datei beinhaltet ein Element "Context" mit den Attributen "path" und "docBase". Die Details kann man dem Beispiel entnehmen.

Ein Beispiel:

Dateiname:
C:\jakarta-tomcat-5.0.25\conf\Catalina\localhost\myWebApp.xml

Dateiinhalt:
<Context path="/myWebApp"
docBase="D:/eclipse_workspace/myWebApp/build/web"
debug="1" privileged="true"
/>

... link (0 Kommentare)   ... comment


Montag, 7. Juli 2008
Tomcat debuggen
Wie debuggt man eine Tomcat Applikation?

1. Enviroment Variablen in catalina.bat eintragen:
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
2. Tomcat starten mit: catalina jpda start
3. In Eclipse: Debug... > Remote Java Application > Host: localhost, Port: 8000

... link (0 Kommentare)   ... comment