This page (revision-8) was last changed on 23-Apr-2022 17:06 by Harry Metske

This page was created on 23-Apr-2022 17:06 by Harry Metske

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
8 23-Apr-2022 17:06 8 KB Harry Metske to previous
7 23-Apr-2022 17:06 8 KB Harry Metske to previous | to last
6 23-Apr-2022 17:06 8 KB Harry Metske to previous | to last
5 23-Apr-2022 17:06 8 KB Harry Metske to previous | to last
4 23-Apr-2022 17:06 8 KB Harry Metske to previous | to last
3 23-Apr-2022 17:06 8 KB Harry Metske to previous | to last
2 23-Apr-2022 17:06 2 KB Harry Metske to previous | to last
1 23-Apr-2022 17:06 2 KB Harry Metske to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 3 added 4 lines
This a summary of hints and tips on running JSPWiki in Tomcat on the mainframe.
[{TableOfContents }]
At line 40 changed one line
* run it as a batchjob, or better, run it as a started task (STC)
* this stuff should go in a read-only mounted HFS, you can then create instances in (for example) /var/tomcat''xx'' %%small (anticipating about 36^2 instances) %% :
{{{
At line 47 added 66 lines
metskem@xat1:/var/tomcat00>l
total 120
lrwxrwxrwx 1 $$BPXRT FUSPOS 22 Sep 26 2006 bin -> /usr/local/tomcat/bin/
drwxrwx--- 3 WIKI00U USIZOS05 8192 Feb 9 09:25 conf
lrwxrwxrwx 1 $$BPXRT USIZOS05 21 Jan 28 10:21 lib -> /usr/local/tomcat/lib
drwxrwx--- 2 WIKI00U USIZOS05 28672 Feb 11 06:00 logs
drwxrwx--- 2 WIKI00U USIZOS05 8192 Jan 12 06:58 temp
drwxrwxr-x 5 WIKI00U USIZOS05 8192 Feb 10 08:50 webapps
drwxrwx--- 3 WIKI00U USIZOS05 8192 Jan 12 07:07 work
metskem@xat1:/var/tomcat00/webapps>cd webapps
metskem@xat1:/var/tomcat00/webapps>l
total 10304
drwxrwxr-x 10 WIKI00U USIZOS05 8192 Jan 12 13:44 ROOT
lrwxrwxrwx 1 $$BPXRT USIZOS05 30 Jan 28 10:47 docs -> /usr/local/tomcat/webapps/docs
lrwxrwxrwx 1 $$BPXRT USIZOS05 38 Jan 28 10:47 host-manager -> /usr/local/tomcat/webapps/host-manager
lrwxrwxrwx 1 $$BPXRT USIZOS05 33 Jan 28 10:47 manager -> /usr/local/tomcat/webapps/manager
}}}
* run it as a batchjob, or better, run it as a started task (STC) \\an example STC proc:
{{{
//TOMCAT PROC ID='00',ACTION='run',JMXPORT='5001'
//*----------------------------------------------------------------
//TOMCAT EXEC PGM=BPXBATCH,REGION=1000M,TIME=NOLIMIT,MEMLIMIT=2000M,
// PARM='SH /usr/local/sys2/bin/tomcat.sh &ID &ACTION &JMXPORT'
//STDOUT DD SYSOUT=*,RECFM=VB,LRECL=1024,HOLD=YES
//STDERR DD SYSOUT=*,RECFM=VB,LRECL=1024,HOLD=YES
}}}
This can be started with the following operator commands :
{{{
S tomct,jobname=tomcat00,ID=00,ACTION='run'
S tomct,jobname=tomcat00,ID=00,ACTION='stop'
}}}
With an example startup script:
%%prettify
{{{
#!/bin/sh
#
# setup DB2 JDBC stuff:
#
export LIBPATH=/usr/lpp/db2810/jcc/lib:$LIBPATH
#---------------------------------------------
export ID=$1
export ACTION=$2
export JMXPORT=$3
#
export CATALINA_HOME=/var/tomcat$ID
export CATALINA_BASE=$CATALINA_HOME
export JAVA_HOME="/usr/lpp/java/J6.0_64"
#export JAVA_OPTS=" -Xmx256M -Xshareclasses:name=RaboDefaultCache,verbose,groupAccess -Xscmx100M "
export JAVA_OPTS=" -Xmx256M "
if [ $ACTION != stop ]
then
echo "using JMX port $JMXPORT"
export JAVA_OPTS="$JAVA_OPTS -Djava.security.auth.login.config=/var/tomcat$ID/conf/jaas.config \
-Ddb2.jcc.propertiesFile=/var/tomcat$ID/conf/db2.jcc.properties \
-Dcom.sun.management.jmxremote.port=$JMXPORT \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.password.file=/var/tomcat$ID/conf/jmxremote.password \
-Dcom.sun.management.jmxremote.access.file=/var/tomcat$ID/conf/jmxremote.access"
fi
#
umask 007
echo "Starting tomcat.sh with CATALINA_BASE=$CATALINA_BASE and ACTION=$ACTION"
. $CATALINA_HOME/bin/catalina.sh $ACTION
}}}
At line 48 changed 2 lines
* binary upload to tomcat's webapp directory
* binary upload to tomcat's webapp directory (do not just drop the warfile !)
* customize your jspwiki.properties (and optionally web.xml and jspwiki.policy)
At line 123 added 2 lines
You probably don't want to run production with the default userdatabase.xml / groupdatabase.xml.
\\So here are some options to use your SAF security system (RACF, ACF2, TopSecret).
At line 127 added 25 lines
Attached you will find a [RACFRealm|racfrealm.jar] implementation.
\\This can be used when you have configured Container Managed Authentication.
Just drop this jar file in tomcat's lib directory and configure the following (example) in your server.xml:
%%prettify
{{{
<Resource name="RACFDatabase" auth="Container"
type="nl.rabobank.hdw.tomcat.realm.RACFRealm"
factory="nl.rabobank.hdw.tomcat.realm.RACFRealmFactory"
description="RACF database"/>
<Realm className="nl.rabobank.hdw.tomcat.realm.RACFRealm"/>
}}}
%%
Recycle tomcat and fire up the tomcat manager application, you should be prompted (Basic Authentication) for your RACF Userid/password.
If you want to use this for JSPWiki, simply enable Container Managed Authentication in the web.xml (see the web.xml for instructions)
There is one big disadvantage of this way of authentication, and that is that you don't get useful error messages back. In our shop we had complaints from people that could not login because of expired passwords or revoked userids and during their login attempt they were not told so.
(the JAAS login module has a solution for this, skip to the next paragraph)
At line 154 added 11 lines
The JAAS login module is just what it says. It's an implementation of the ''javax.security.auth.spi.LoginModule''.
To use it in JSPWiki :
* drop the attached [racfloginmodule|racfloginmodule.jar] in tomcat's lib directory
* configure this in jspwiki.properties:
{{{
jspwiki.loginModule.class = nl.rabobank.hdw.auth.login.RACFLoginModule
}}}
* do not use Container Managed Authentication in this case
That's it, recycle your tomcat and login
At line 64 changed one line
%%code
%%prettify
{{{
At line 74 changed one line
Specify an encoding when using the getBytes method to convert a String to a ByteArray:
// Specify an encoding when using the getBytes method to convert a String to a ByteArray:
At line 78 changed one line
Also specify an encoding when creating a String from a ByteArray:
// Also specify an encoding when creating a String from a ByteArray:
At line 191 added one line
}}}
At line 193 added 15 lines
! Shell script files in DOS format
If your shell scripts are in DOS format (instead of Unix format) they don't run.
\\The easiest way to check this is use your favorite Editor (UltraEdit or something else) and convert them to Unix format.
\\You can also check it with the ''hexdump'' command:
{{{
metskem@xat1:/usr/local/tomcat/bin>hexdump version.sh | grep '0d 15'
}}}
You should not see that many '0d 15' occurrences.
You can strip off these hex'15' chars with (example) :
{{{
cat version.sh | tr -d '\r' > versionNew.sh
}}}