Jigsaw web server on MPE/iX The Jigsaw web server from www.w3.org is written in pure Java and ran out of the box when I recently downloaded it to give it a try. There was nothing to port, Java seems to fulfill the write-once-deploy-everywhere promise once more here. Jigsaw is Open Source software and implements the Servlet API, which makes it quite interesting for implementing web applications or adding a web frontend to existing applications using server side Java. Unlike the Apache JServ approach, where http server and servlet engine are separate, Jigsaw combines both into a single program (multithreaded process). Find session snippets below, that show what I did to install and run Jigsaw on my MPE/iX 5.5 machine using the Java/X 1.1.7B JDK as well as Samba/iX 0.7c from Jazz. Please notice that there will be a mix of MPE CI, Shell, and DOS commands, so look at the prompt to see which Window to type into... Please keep in mind that I am only *tasting* software, not *testing* it. So don't blame me in case something does not work for you as expected. Have fun. I did. Lars "only speaking for myself, as usual" Appel _____________________________ MPE/iX:hello lars,manager.sys HP3000 Release: C.55.00 User Version: C.55.06 SUN, MAR 28, 1999, 9:18 AM MPE/iX HP31900 C.05.08 Copyright Hewlett-Packard 1987. All rights reserved. :# :# My system already has the IX account, with CAP=+PH for account and MGR :# :report @.ix ACCOUNT FILESPACE-SECTORS CPU-SECONDS CONNECT-MINUTES /GROUP COUNT LIMIT COUNT LIMIT COUNT LIMIT IX 0 ** 206 ** 253 ** */APACHE 4832 ** 204 ** 251 ** /PUB 0 ** 2 ** 2 ** :newgroup jigsaw.ix ;access=(r,w,a,l,x,s:GL) :newgroup jigsaw.ix ;onvs=other_set :altgroup jigsaw.ix ;homevs=other_set :newuser jigsaw.ix ;pass=dontknow :altuser jigsaw.ix ;home=jigsaw ;cap=+PH,GL :newlink /usr/local/jigsaw, /IX/JIGSAW :# :# Now let's quickly add a helpful smb.conf section for PC access via Samba/iX :# If your smb.conf already has similar entries in [homes] you might skip this :# :xeq /bin/sh -L shell/iX> ### notice the double >> to append instead of wiping out smb.conf !! shell/iX> cat >> /usr/local/samba/lib/smb.conf [jigsaw.ix] comment = Home of Jigsaw web server on MPE/iX guest ok = no write ok = yes path = /IX/JIGSAW preserve case = yes short preserve case = yes create mode = 0750 map archive = no user = jigsaw.ix only user = yes :EOD shell/iX> /usr/local/samba/bin/testparm Load smb config files from /usr/local/samba/lib/smb.conf Loaded services file OK. WARNING: You have some share names that are longer than 8 chars These may give errors while browsing or may not be accessible to some older clients Press enter to see a dump of your service definitions Global parameters: ... Default service parameters: ... Service parameters [jigsaw.ix]: comment: Home of Jigsaw web server on MPE/iX preserve case: Yes short preserve case: Yes path: /IX/JIGSAW username: jigsaw.ix read only: No create mask: 0750 map archive: No only user: Yes ... shell/iX> exit :# :# Now we can logon as vanilla (+PH) user JIGSAW.IX for the remaining setup :# :hello lars,jigsaw.ix HP3000 Release: C.55.00 User Version: C.55.06 SUN, MAR 28, 1999, 9:26 AM MPE/iX HP31900 C.05.08 Copyright Hewlett-Packard 1987. All rights reserved. :newdir temp Created directory "TEMP.JIGSAW.IX". :# :# I have the Jigsaw download on my PC, so I use Samba/iX to copy to the 3000 :# Notice that I use DOS commands only because they cut & paste easier here :-) :# C:\> NET USE X: \\my3k.grc.hp.com\jigsaw.ix userpass,acctpass C:\> NET USE ... C:\> DIR X: ... C:\> COPY \temp\jigsaw_2.0.1.tar.gz X:\TEMP :# :# okay, we are back in the 3000 window, as you'll notice from the prompt ;-) :# :chdir temp CWD is "TEMP.JIGSAW.IX". :listfile ./@ ,2 PATH= /IX/JIGSAW/TEMP/ CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME SIZE TYP EOF LIMIT R/B SECTORS #X MX 1B BA 2765360 2147483647 1 10816 9 32 jigsaw_2.0.1.tar.gz :xeq /usr/local/bin/gzip "-d jigsaw_2.0.1.tar.gz" :listfile ./@ ,2 PATH= /IX/JIGSAW/TEMP/ CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME SIZE TYP EOF LIMIT R/B SECTORS #X MX 1B BA 13803520 2147483647 1 53920 30 * jigsaw_2.0.1.tar :xeq /bin/tar "-xvof jigsaw_2.0.1.tar" TAR.HPBIN.SYS: blocksize = 20 x Jigsaw/lib/libUnix.so, 1880 bytes, 4 tape blocks x Jigsaw/ANNOUNCE, 824 bytes, 2 tape blocks x Jigsaw/Jigsaw/WWW/User/FAQ.html, 23760 bytes, 47 tape blocks x Jigsaw/Jigsaw/WWW/User/Overview.html, 3438 bytes, 7 tape blocks ... x Jigsaw/src/classes/org/Makefile, 2606 bytes, 6 tape blocks x Jigsaw/src/classes/Makefile, 489 bytes, 1 tape block x Jigsaw/src/makefiles/file.make, 1055 bytes, 3 tape blocks x Jigsaw/src/makefiles/package.make, 1376 bytes, 3 tape blocks :chdir ./Jigsaw CWD is "/IX/JIGSAW/TEMP/Jigsaw". :xeq /bin/sh -L shell/iX> pwd /IX/JIGSAW/TEMP/Jigsaw shell/iX> ls -l total 19 -rw-rw-r-- 1 JIGSAW.IX IX 824 Jan 18 16:49 ANNOUNCE -rw-rw-r-- 1 JIGSAW.IX IX 3092 Dec 24 13:41 COPYRIGHT drwxrwxrwx 8 JIGSAW.IX IX 992 Dec 24 13:58 Jigsaw -rw-rw-r-- 1 JIGSAW.IX IX 2020 Jan 18 16:50 README drwxrwxrwx 2 JIGSAW.IX IX 320 Jan 18 16:26 classes drwxrwxrwx 2 JIGSAW.IX IX 320 Dec 24 13:45 lib drwxrwxrwx 5 JIGSAW.IX IX 608 Dec 24 13:06 src shell/iX> mv * /IX/JIGSAW shell/iX> exit :chdir CWD is "/IX/JIGSAW". :listfile ./@ ,2 PATH= /IX/JIGSAW/ CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME SIZE TYP EOF LIMIT R/B SECTORS #X MX 1B BA 824 2147483647 1 16 1 * ANNOUNCE 1B BA 3092 2147483647 1 16 1 * COPYRIGHT 16W HBD 0 67107839 1 32 1 * Jigsaw/ 1B BA 2020 2147483647 1 16 1 * README 16W HBD 0 67107839 1 32 1 * TEMP/ 16W HBD 0 67107839 1 32 1 * classes/ 16W HBD 0 67107839 1 32 1 * lib/ 16W HBD 0 67107839 1 32 1 * src/ :purgedir temp ;tree Purge ALL files below and including "TEMP.JIGSAW.IX"? (ALL/NO)all :print readme ;page=0 Jigsaw release 2.0.1 ------------------------- Due to this original architecture, Jigsaw's configuration process is not the one you are used to see in file-based servers, this is why this README starts by this warning: Read the documentation first ! Running the server: ------------------- To read the documentation, you will have to first run Jigsaw, the simplest way of doing so is the following: 0) Get a Java interpreter and install it. As of Jigsaw/1.0beta, Java version 1.1 is required. You can get Sun's Java intepreter for free from: http://www.javasoft.com 1) Set your CLASSPATH environment variable in order to include Jigsaw's classes. To do this: On Windows set CLASSPATH=\Jigsaw\classes\jigsaw.zip;. On UNIX export CLASSPATH=/Jigsaw/classes/jigsaw.zip:. Where should be substitued with the absolute path of the directory in which you unpacked Jigsaw. NOTE: If you use jdk1.2, you may have to add the tools.jar provided in the jdk1.2 distribution. It is required for pagecompilation. 2) Check that your PATH setting allow you to run the Java interpreter. This will usually be the case if you have installed Sun's JDK. 3) Build the right property files Go to /Jigsaw/Jigsaw (Windows: \Jigsaw\Jigsaw) and execute: java Install 5) Run the server: On Windows java org.w3c.jigsaw.Main -root \Jigsaw\Jigsaw On UNIX java org.w3c.jigsaw.Main -root /Jigsaw/Jigsaw 5) Point your browser to the server's home page. At step 3), the server will have emited the full URL it is listening on, just point your browser to this URL and follow the instructions. Submiting bugs, giving feedback: -------------------------------- A mailing list is available for Jigsaw related discussions: www-jigsaw@w3.org To subscribe, send mail to www-jigsaw-request@w3.org, with subject "subscribe" Enjoy ! Jigsaw Team :setvar classpath hpcwd+"/classes/jigsaw.zip:." :showvar classpath CLASSPATH = /IX/JIGSAW/classes/jigsaw.zip:. :help java USER DEFINED COMMAND FILE: JAVA.PUB.SYS ANYPARM PARMS XEQ /usr/local/java/latest/bin/PA-RISC/green_threads/JAVA;INFO="!PARMS" :java -version java version "JDK 1.1.7B" :chdir ./Jigsaw CWD is "/IX/JIGSAW/Jigsaw". :java Install No Floating-Point coprocessor, disabling JIT Jigsaw/2.0.1 setup. updating /IX/JIGSAW/Jigsaw/config/http-server.props ... done. updating /IX/JIGSAW/Jigsaw/config/admin-server.props ...done. Installation complete with 0 warning. type 'java org.w3c.jigsaw.Main -root /IX/JIGSAW/Jigsaw' to launch Jigsaw. type 'java org.w3c.jigadm.Main -root /IX/JIGSAW/Jigsaw http://localhost:8009' to launch the JigAdmin tool. :chdir CWD is "/IX/JIGSAW". :editor HP32201A.09.00 EDIT/3000 SUN, MAR 28, 1999, 9:50 AM (C) HEWLETT-PACKARD CO. 1993 /a 1 !job httpd,jigsaw.ix ;pri=cs 2 !setvar classpath "!hpcwd/classes/jigsaw.zip:!hpcwd/classes" 3 !setvar jbin "/usr/local/java/latest/bin/PA-RISC/green_threads" 4 !run !jbin/JAVA ;nmstack=40000000 & 5 ! ;info="org.w3c.jigsaw.Main -root !hpcwd/Jigsaw" 6 !eoj 7 // ... /k httpj,unn /e END OF SUBSYSTEM :stream httpj #J1708 :showproc job=!hplastjob QPRI CPUTIME STATE JOBNUM PIN (PROGRAM) STEP C152 0:00.420 WAIT J1708 142 :RUN !jbin ;nmstack=40000000 ;info="o$ C152 0:03.215 WAIT J1708 85 (/JAVA/PUB/jdk1.1.7/bin/PA-RISC/green_th$ :# after a few moments the server job showed the following job listing :print !hplastspid.out.hpspool JOB HTTPD,JIGSAW.IX,JIGSAW. Priority = CS; Inpri = 8; Time = UNLIMITED seconds. Job number = #j1708. SUN, MAR 28, 1999, 9:56 AM. HP3000 Release: C.55.00 User Version: C.55.06 MPE/iX HP31900 C.05.08 Copyright Hewlett-Packard 1987. All rights reserved. STREAMED BY LARS,JIGSAW.IX (#S546) ON LDEV# 18 STREAM DATE: SUN, MAR 28, 1999, 9:56 AM :setvar classpath "!hpcwd/classes .zip:!hpcwd " :setvar jbin "/usr/local/java/latest/bin/PA-RISC/green_threads" :run !jbin ;nmstack=40000000 & : ;info="org.w3c.jigsaw.Main -root !hpcwd " loading properties from: /IX/JIGSAW/Jigsaw/config/server.props Jigsaw[2.0.1]: serving at http://my3k.grc.hp.com:8001/ *** Warning : no logger specified, not logging. JigAdmin[2.0.1]: serving at http://my3k.grc.hp.com:8009/ :# Notice that it must stay alive for the server to run, so no :EOJ above! :# Now the 3000 should already respond to http://your3k:8001 requests :# Read the docs to learn about the JigAdmin GUI which comes as a Java :# client program (not an applet!) and can be run from the PC this way: C:\> set classpath=%classpath%;X:\classes\jigsaw.zip C:\> java org.w3c.jigadm.Main -root X:\Jigsaw http://your3k:8009 :# Notice that the above assumes your PC has Java JDK installed and setup :# properly. It should also work if you are using only the JRE Java Runtime :# Environment instead (just use jre instead of java). :# Also notice this clever use of Java in combination with Samba! The files :# of the Java application reside on the 3000 disk but are executed by the PC :# (not downloaded) utilizing the PC CPU and memory as well as the Windows :# GUI for the AWT display. This should also work with a Mac as long as you :# have Dave from www.thursby.com or a similar product that allows the Mac to :# participate in SMB based file/print server networking. :# If you don't have Samba, you might be able to either run the JigAdmin :# program on the 3000, exporting the DISPLAY to an X11/Motif display station :# like Linux or Unix workstation (not sure if PC X-Emulation will work). :# Or you might probably download the /IX/JIGSAW/classes/jigsaw.zip file to :# your PC and execute JigAdmin locally (not sure if it will work this way). Add web pages to /IX/JIGSAW/Jigsaw/WWW and below (by default). Add Java servlets to /IX/JIGSAW/Jigsaw/servlets (by default). You may need to add the Java Servlet Developer Kit classes (jsdk.jar) to Jigsaw's classpath (or unpack them under the classes directory) to make servlets load properly. If the servlets use JDBC, you must also make your JDBC driver classes accessible to the Jigsaw classpath. Good luck & have fun.