Running JSPWiki on the Mainframe#
What's the big deal ?#
The IBM Mainframe runs a whole series of operating systems:
- z/OS (formerly called OS/390 and MVS
- z/Linux
- VSE
- TPF
- z/VM (Hypervisor that can run all the OS's mentioned above)
- CF code
- anymore ?
The "flagship operating system" is z/OS, mainly used by financial institutions and multinationals.
z/OS runs on IBM proprietary hardware, the current model is IBM System z10.
You can also run it under a Hercules emulator
.
z/OS offers Unix System Services
.
So basically you can run Unix-type applications on the mainframe, at least that's the theory.
In practice, most applications cannot be easily ported.
For Java this is different, Java offers real platform independence, so running Java applications on the mainframe is not a big deal.
The major big difference with other OS's is the default encoding, which is EBCDIC (CP037 or Cp1047). This is also true for Java applications, although you can start a JVM with ' -Dfile.encoding=ISO8859-1' (IBM WebSphere Application Server does so)
For most Systems programmers, running JSPWiki on the mainframe is a natural choice:
- you know your way around in the environment
- you can reuse your existing backup procedures
- reuse your existing disaster recovery procedures
- integrate with your existing RACF/ACF2 security package
Installing Tomcat#
- download Tomcat
- unzip it
- binary upload it to the mainframe
- ascii->ebcdic convert your shell scripts
- run it as a batchjob, or better, run it as a started task (STC)
Installing JSPWiki#
Basically the same procedure
- download JSPWiki
- unzip it
- binary upload to tomcat's webapp directory
Authentication (and authorization) against SAF #
Tomcat realm#
JAAS Login module#
Pit falls#
Assuming ASCII#
Some Java applications make the false assumption that the default encoding is ASCII, and those don't run correctly on the mainframe.
So when doing IO (files, sockets) think about what the encoding is for the data you are writing/reading :
Specify an encoding when using the getBytes method to convert a String to a ByteArray:
byte myBytes = myString.getBytes("8859_1");
Also specify an encoding when creating a String from a ByteArray:
String myString = new String(myBytes, "8859_1");
