ContentsGetting Set UpInstalling on a Developer's PC
Previous: Prerequisites | Next: A Simple Test Page

Installing on a Developer's PC

I'm making the assumption that you are a developer who has a PC and a Java development environment.  As such, I also assume you know how (and have sufficient privileges) to download and install things.

There are two procedures that you can use, depending how interested you are in seeing how this all works.  The first is the fastest, simplest way and assumes installation directories, etc.  The second should be used if you want to get all of the pieces and put them together for yourself.

The fast and easy way (using vqserver):

  1. Download and unzip the WELD kit to the top of C:\ taking care to "Use folder names" in the WinZip "Extract" dialog box.  This will create a directory called C:\vqserver with everything in it
  2. Edit the C:\vqserver\weld.bat file to be sure that the path includes the directory where your preferred jre.exe or java.exe is on your machine
  3. Start up vqserver with Start|Run "c:\vqserver\weld"
  4. Use your web browser to look at http://localhost/servlet/weld/cmds.weld (while vqserver continues to run)

The fun and educational way (using Sun JSDK):

  1. Download and install the Java Servlet Development Kit (JSDK)
  2. Download JACL and compile it (if you chose to get the source instead of pre-built binaries)
  3. Download weld.jar (or get weldsrc.zip, and unzip / recompile if you prefer)
  4. Download cmds.weld (this may require a right-click) to the top-level directory of the JSDK
  5. Download weld.properties (this may require a right-click) to the top-level directory of the JSDK
  6. Download session.tcl (this may require a right-click) to the top-level directory of the JSDK
  7. Modify weld.properties so that these properties point to good places:

    var.CounterFile=/<someplace>/counters.dat

    var.IncludeDir=/<someplace>/include

    script=/<someplace>/session.tcl

     

  8. Add the weld.jar, jacl.jar, and tcljava.jar to the JSDK servletrunner configuration file (this step varies depending on the version of the JSDK you installed)
  9. Configure the weld servlet alias (the class name is "us.oh.state.common.utility.TemplateProcessor") and initArgs (config=weld.properties - you have to supply the path)
  10. Start up the servletrunner
  11. Use your web browser to point to the WELD servlet, adding a tail which points to cmds.weld (as the web server would see it)

Now that you have a web server, a servlet engine, JACL, and WELD installed (optional)...

  1. However you got here, you should have another browser window with the title "Commands" - the list of JACL commands available to WELD users
  2. View/edit the WELD file (one way to do this is Start|Run "write c:\vqserver\public\cmds.weld", assuming you chose to use vqserver) It's OK to use notepad, MicroEMACs, or any HTML editor you like - WELD files are just text
  3. Note that WELD commands are surrounded by "[" and "]", and that these brackets may be nested - so you can call commands within commands
  4. Note that variable names start with a "$" and do not need to be within brackets
  5. Modify the HTML comment "<!-- regsub -a / $PageName # PageName -->" to have the brackets around the WELD command as so: "<!-- [regsub -a / $PageName # PageName] -->" (this will replace the "/" character with a "#" in the page name that gets displayed)
  6. Save the cmds.weld file (be sure your editor didn't change the name)
  7. Refresh / reload the page in your browser... instead of getting the commands, you should get a "bad switch" error telling you that -a is not valid
  8. Once again, modify the regsub, this time changing the "-a" to "-all" in compliance with the error message
  9. Save the file again
  10. Refresh / reload the page - we now have the regsub working, but it isn't making any changes because the path separator is "\" instead of "/"
  11. Modify the regsub, and where the "/" is, put {\\} (i.e. "<!-- [regsub -all {\\} $PageName # PageName] -->")
  12. Save the file again
  13. Refresh / reload - the page name displayed on the line above the hit counter should change to use "#" instead of "\"

ContentsGetting Set UpInstalling on a Developer's PC
Previous: Prerequisites | Next: A Simple Test Page

Modified: Tue Apr 18 10:48:22 EDT 2000