Grabber Softwares : Enhance Your Computing
Instant ASP

Run ASP scripts on your Linux Webserver

Active Server Pages is a technology from Microsoft that lets youquickly create dynamic Web pages using simple server-side scripts. Using languages like VBScript and JavaScript, scripts embedded in HTML let you do a variety of things like provide user logins, change the content depending on the user, change the time of the day, and most importantly, connect to back-end databases and store, retrieve and manipulate data using the Web as a front-end. Go to almost any modern e-commerce or shopping site on the Net, and you’ll see that the extension of the file is ASP. (For details on ASP, see my series in PC Quest, September (page 104) and October (page 152) 1998).

However, ASP has (or had) one major drawback. Unlike Perl, which is available for almost any platform, ASP could be run only on Win NT servers with IIS 3 or above. (Win 9x with Personal Webserver 4 also supports ASP). But not any more. Using Halcyonsoft’s iASP, you can serve ASPs from a variety of Webservers and operating system platforms, which of course include Apache 1.3.x on Red Hat Linux 5.x and 6.x.

Installing iASP

Before installing iASP on Red Hat Linux 6.1, you need to have the latest Java Development Kit installed on your system. This month’s PCQ CD contains the pre-release version of the JDK1.2 and that works pretty well.

First, install JDK into /jdk-1.2 on your machine. Next shut down the Apache Webserver. This is required as iASP makes a few changes in the configuration files and things don’t get updated if the server is running. You can do this by using the command "/usr/local/apache/bin/apachectl stop", assuming Apache is installed in /usr/local/apache.

Next, install the RPM file of iASP on the CD using "rpm –ivh iasp*.rpm". This will create an iASP directory in /usr/local and copy the required files in it. Now go to this directory and edit the following files—connector.sh, start-admin.sh, start-server.sh, stop-server.sh, stop-admin.sh. In each of these, you’ll see a line starting with JAVAHOME=. Add the path to where you installed the JDK. In our case, make the line, JAVAHOME=/jdk-1.2.

Now run the connector.sh script in this directory. If you’ve set the variable correctly, you’ll be able to configure iASP on your system without any problems. Simply answer the questions as they come. The script asks for the name and version of the Webserver you’re installing iASP to, and the path to the Apache conf directory (typically /usr/local/apache/conf) and you’re on your way. To start the iASP server, run the start-server.sh file. Then restart your Webserver using /usr/local/apache/bin/apachectl start. Note that if you’ve custom modules compiled for Apache, these might conflict with iASP. I did have some problem installing iASP when I had one such module. Removing it and reinstalling Apache solved the problem.

ASPing in Linux

To test iASP, I quickly copied some pre-existing scripts from a Windows machine and put it into the Linux test box. I was pleasantly surprised to see all of them run without any problems. I didn’t have to change a single line of code to get them working.

But these were comparatively simpler scripts, not having back-end database processing or using advanced features. To use databases, you need to get, install and configure JDBC drivers for them. These are also available from Halcyonsoft for most of the major databases.

In fact, iASP supports many of the popular server-side objects available for ASP on IIS/NT, albeit with some minor code changes. For example, there are replacement objects for popular ones like Jmail (the SMTP mail server for ASP), etc. All you need to do (and that too only in certain cases) to get it up and running is change the objectName=Server.Create Object line to the one supplied by Halcyonsoft.

iASP also supports some of the new extensions in IIS 5 for Windows 2000. Most significantly, the Server.Transfer method is already implemented and can be of great use. (For more details on IIS 5, see PC Quest May 1999, page 123.)

Administering iASP

iASP itself can be administered through a Java-based console. To get this up, you must first run the start-server script, and then use a Web browser to connect to the admin port that you specified during the configuration of iASP. This allows you to set and change many different parameters, just like the ones you get in IIS when you go to the properties of a Web application. For example, you can set the timeout for an ASP script, whether the content is buffered or not, or whether ASP apps run in debug mode.

Technology

iASP is implemented in Java using a technology called Servelets. These are small server-side Java modules that run on a Webserver and provide dynamic content, much in the fashion of Perl, ASP, and such others. This is one of the few, if not the only useful implementation of Java that I’ve seen. Performance is pretty snappy (although the trial version only allows two simultaneous connections to the server), even though there must be a lot of ASP-to-Java mapping going on in the background.

iASP is available for a multitude of Webservers, ranging from Sun to Apache and even Netware. Surprisingly, it’s even available for Windows and IIS. Wonder why anyone would use iASP on a Win NT machine running IIS?

If you’re a Web space provider who also wants to provide ASP hosting on a cheap server, then invest in this product. For ease of use and the range of services that you can provide, this is a pretty nice solution. If you’re a developer who sits mostly on Linux (or almost any other platform for that matter), and also needs to code in ASP once in a while, the trial version is a good way to try it out before you buy it. In either case, this lets you use your existing Linux box as an ASP server as well.

The standard version of iASP will cost you $495 and can be ordered from www.halcyonsoft.com.