CSC/MIS Students: Scripting


Server side scripting

Server Side Java Scripting
Servlets are Java components that can be plugged into a Java-enabled web server to provide custom services. For more information on Java server-side application development, please refer to Server Side Java Scripting.

Server Side Includes
Server Side Includes [SSI] are special commands that are placed in HTML pages, and processed by the web server each time a page is requested. Information on how to set up an account for Server Side Includes.

Common Gateway Interface [CGI] is a protocol for providing an interface between a web server and a program external to the server. Using the CGI protocol, a web client may specify a program, known as a CGI Script, as the target of an HTTP [or web] request. Information on how to set up an account for CGI scripts.

PHP is scripting language used mostly on Unix/Linux web servers. PHP scripts are embedded within a Web page along with its HTML. Before the page is sent to a user that has requested it, the Web server calls PHP to interpret and perform the operations called for in the PHP script. For more information, please refer to PHP on UISACAD.


Using Cobol

You may create your Cobol source files using one of the editors on uisacad [vi, joe, or emacs] To use joe, for example, log on to your account and enter the command:

joe myprogm.col

Or, you may wish to create your source file on a PC and upload the file to your account on uisacad using FTP.

To compile your source file, enter the command:

cob myprog.cbl

Any errors are displayed on the screen. If there are a lot of errors then you can direct the errors to a listing file so you can refer to them while applying corrections. The following command creates a listing file, myprog.lst:

cob -P myprog.cbl

Once you have cleared all your syntax and logic errors, you can create a program that you can run directly. To get the best speed you should create native object code. To do this, generate your program using:

cob -u0

This creates a native object code file myprog.gnt. You run this using the cobrun command.

Reference Manuals: The complete set of Micro Focus reference manuals are available in the HSB 109 computer lab. You may only use the manuals in the lab.


Running Java Server Pages [JSP], Servlets and Beans

To enable your account for JSP, servlets and beans, send an email to System Administrator. Once your home directory is jsp/java servlet enabled you should see two links listed in the directory. One is jsp and the other is classes. You must place your servlets and beans in the classes folder and your java server pages in the jsp folder. Then to invoke a servlet you can use the URL:

All bean and servlet classes must be compiled manually and packaged with your-account-id.
Example: package your-account-id;

Then you can instantiate them from your jsp file with the directive:
<jsp:useBean id=”mybean” scope=”page” class=”your-account-id.bean-name” >

JSP files can be accessed by using the URL:


Enabling CGI

Choose a directory where you want cgi enabled on. This directory must be somewhere inside your public_html directory. The easiest thing to do is to create a directory called cgi-bin inside your public_html directory. Using your favorite editor create a file called .htaccess in that directory. In the .htaccess file, you’ll need the following directives:

Options +ExecCGI
AddHandler cgi-script cgi pl

This tells Apache that execution of CGI programs is permitted in this directory and that your cgi scripts will have the extension .cgi or .pl.



The default print queue for uisacad is UHB2030BW_Q
located in the computer lab UHB 2030.

To print a text file to that printer simply run the command:
enscript file_name

To send a printjob to the Line Printer you can run the command:
lp -d lprint filename