Depends on the OS
Mac: /Library/JSS/Tomcat/webapps/ROOT/WEB-INF/xml/DataBase.xml
Linux: /usr/local/jss/tomcat/webapps/ROOT/WEB-INF/xml/DataBase.xml
Windows: C:Program FilesJSSTomcatwebappsROOTWEB-INFDataBase.xml
More Information: https://jamfnation.jamfsoftware.com/article.html?id=360
- RD
When tomcat is restarted it will be expanding the ROOT.war file each time, therefor over writing the edits to the DataBase.xml (at least I believe thats how it works). They way I do it is take the ROOT.war, expand it, change the files I need, DataBase.xml and log4j.properties (as the location is the mac default location which isn't good for linux). Then repack the war file and put that in the webapps directory.
1#!/bin/bash
2unzip -qq -o -d /tmp/JSS ~/LOCATION/OF/ORIGINAL/WAR/ROOT.war
3
4OLD="Library/JSS/Logs"
5NEW="var/log/JSS"
6DPATH="/tmp/JSS/WEB-INF/classes/log4j.properties"
7BPATH="/tmp"
8TFILE="/tmp/out.tmp.$$"
9[ ! -d $BPATH ] && mkdir -p $BPATH || :
10for f in $DPATH
11do
12 if [ -f $f -a -r $f ]; then
13 /bin/cp -f $f $BPATH
14 sed "s/$OLD/$NEW/g" "$f" > $TFILE && mv $TFILE "$f"
15 else
16 echo "Error: Cannot read $f"
17 fi
18done
19/bin/rm $TFILE
20
21OLD2="jamfsw03"
22NEW2="YOURDBPW"
23DPATH2="/tmp/JSS/WEB-INF/xml/DataBase.xml"
24BPATH2="/tmp"
25TFILE2="/tmp/out.tmp.$$"
26[ ! -d $BPATH2 ] && mkdir -p $BPATH2 || :
27for f in $DPATH2
28do
29 if [ -f $f -a -r $f ]; then
30 /bin/cp -f $f $BPATH2
31 sed "s/$OLD2/$NEW2/g" "$f" > $TFILE2 && mv $TFILE2 "$f"
32 else
33 echo "Error: Cannot read $f"
34 fi
35done
36/bin/rm $TFILE2
37echo 'Files edited'
38cd /tmp/JSS ;
39zip -r -qq /LOCATION/TO/SAVE/ROOT.war *