Getting JGenerator running on Mac OS X
Compiled by Robert M. Hall of mCom LLC on 5-17-2001
So here are the steps I took to get my G4 running OS X up and running with Jgenerator, along with necessary links to files and documentation.
A few steps are not totally necessary just to get Jgenerator running and I've indicated which ones are optional. I included them so that anyone contemplating this setup would have a very robust, fully functional web server with mySQL, a web based GUI for mySQL, latest build of PHP, and Cocoon for XML work. These are all opensource and free and most users would want to include these anyway to take advantage of Jgenerator.
So here goes:
1) Started with fresh OS X install and downloaded and installed all latest Apple updates taking it to 10.0.3
2) This step is optional. Installed and compiled latest version of mySQL 3.23.36 Using instructions found at:
http://homepage.mac.com/murraytodd/enterprise/mysql.html3) Installed and compiled Apache 1.3.19 and PHP 4.0.5 (PHP install optional) according to article found at Stepwise:
http://www.stepwise.com/Articles/Workbench/2001-03-24.01.html4) This step is optional. Installed PHPmyAdmin 2.1.0 available at:
http://phpwizard.net/projects/phpMyAdmin/index.htmlThis is just an easy to use web based GUI for controlling/administrating MySQL databases using PHP. This is a perfect test for checking all three of the previous installs as it uses, PHP, Apache and mySQL. Also handy for quickly changing the user table and grant tables in mySQL in order to lock mySQL down. Make sure you set it up to use advanced authentication. I also locked it down in the Apache httpd.conf by only allowing connections to that directory by localhost (127.0.0.1) After verifying that all three of those service are working properly did the next few steps:
5) Downloaded and installed Tomcat and Cocoon from the premade Mac OS X package and instructions available at:
http://homepage.mac.com/murraytodd/tomcat.htmlFor your reference that package installs Tomcat into /Library/Tomcat/ It also makes a special folder for the mod_jk.conf and other conf files in: /private/etc/httpd/users/ so you know where they are if you need to edit them manually. It also modifies your /etc/httpd/httpd.conf file to include the contents of /private/etc/httpd/users/ folder. If you already have some of the above services installed and running heres a link to a page just to get tomcat and mod_jk.so compiled, and placed in the right location and working:
http://homepage.mac.com/murraytodd/modjk.htmland the following link has some additional info: http://www.worker-bee.com/misc_dev/install_tomcat.html
6) Restarted the machine to allow the premade Tomcat and Cocoon package to do its thing on startup. Very handy. Then I tested Apache and Tomcat along PHP and mySQL again just for good measure. Everything was working fine. Good so far. :)
7) Made sure Tomcats example files were coming up by requesting http://localhost/examples/ Came up fine. :)
8) From here on out follow the existing instructions for getting jgenerator 1.2.4 installed to work with Tomcat and it works great!
That entailed, modifying the server.xml file in the Tomcat/conf directory according to the already posted instructions for installing with Tomcat, along with creating a lib folder in the proper WEB-INF folder and copying the jgen.jar file in there and editing the corresponding web.xml file. Then tried it out by dropping in some .swts and going to: http://localhost:8080/mystest.swt and it worked perfectly!My only problem is that all .jsps and other class files, and examples work fine and Apache passes them on to Tomcat and back again without having to specifically request port 8080, that is mod_jk seems to allow them to talk together, but I cant get .swt files from Jgenerator to show up without specifying 8080 I am sure this is just a configuration issue somewhere that I am overlooking and is just a minor inconvenience at this time. I am not a Tomcat expert so if anyone else has some ideas or knows how to change this let us know.
Regardless of that minor issue, I am now able to serve .swts without a problem. MySQL handles the database work, PHP handles webscripting nd programming, Apache serves up all the standard stuff, mod_jk.so allows Apache and Tomcat to work together so Tomcat can handle all the .jsp's, servlets and passing off .swts to Jgenerator. And Cocoon handles xml to html.. This is an ideal development environment for high quality, high performance, easily scalable web sites. Plus its all open source, FREE and now it works on my favorite graphic design platform the Apple Macintosh. I can sit and work with Flash 5 open running under the bluebox in OS X, a Carbon build of BBEdit 6.1 for editing PHP, Perl, Flash ActionScript (check out my custom glossary file for BBEdit 6.1x and higher, for editing Flash 5 ActionScript in BBEdit.), a terminal/shell window for direct control of mySQL and other system level commands. Plus as soon as I save a file I can instantly query my own system and see the results exactly as it would appear on a live deployment.
Plus all this will work on an iBook or or Powerbook so you could take a live production site to a clients for demoing! This is fantastic! Now everyone needs to sign up on Sourcefourge and contribute/work on getting Jgenerator charts working, tweak the image inserts and export to image format working and you ready for primetime for most intents. Great work Dmitry! One note about charts. Check Macromedias Exchange for Flash and there is an excellent SmartClip called appropriately enough: Line Chart. It is a great piece of code that could be adopted pretty easily for most charting purposed until Jgenerator can fully handle them. I already have a version working that can open a socket to an XML server and constantly update itself. Something you can't do in either Generator or Jgenerator without putting an unnecessarily large load on your server.
As a side note I have some web sites on Verios Solaris Virtual Private Servers (VPS) Verio provides automatic installers for all the packages mentioned above except for Cocoon and Jgenerator. So I was also able to get Jgenerator running on my Verio Solaris VPS as well. Only difference between my Mac OS X setup and the Verio Solaris setup is slight version variations in Apache and PHP (As they use custom compiled builds to work with their VPS servers) Tomcat is the latest stable release 3.2.1 and I am only lacking Cocoon. So if you have a Verio Solaris VPS account you can have Jgenerator up and running and in under half an hour if your fast with the Verio VPS documentation and pico.
Good luck!
PS. I cant promise to answer all questions about individual setups or problems but if you find glaring errors, or have further contributions, etc. please feel free to drop me an email.
Rob
Robert M. Hall
Senior Rich Media Developer
MCOM LLC