Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

At IU, what is the instructional web programming environment on Mentor, and how do I use it?

Note: The computer associated with the name Mentor is also called Scythe; i.e., mentor.ucs.indiana.edu is equivalent to scythe.uits.indiana.edu.

The instructional web programming environment on Mentor is a Unix-based system of services provided for use by advanced classes on web programming and serving data over the web. Mentor hosts individual Apache web servers to allow students to develop and serve web pages or applications. For classes on serving data over the web, these web servers can be loaded with Tomcat modules for student-developed Java applications connected to a Unix-based Oracle database back end.

On this page:


Requesting accounts on Mentor

Only Indiana University faculty can request Apache/Tomcat accounts on Mentor. To do so, complete the Request Form for Database and Web Accounts for Instruction.

Student accounts are valid for the duration of the course, and automatically expire approximately two weeks after the end of the semester. Faculty accounts do not expire.

Note: IU instructors who would like to use the Mentor environment for instruction should contact UITS well before they intend to use it because multiple groups coordinate setup of the environment.

Environment details

Mentor

  • Hardware: Sun V880

  • Available software:

    • Solaris 9 Operation Environment
    • CVS 1.11.5
    • Pine 4.63 (includes Pico)
    • Emacs 21.4
    • JED 0.99
    • Vi
    • GNU C compiler (gcc) 3.4.1
    • Perl 5.8.6 with DBD-Oracle-1.16, DBI, Apache::DBI, Apache::DB, Bundle::LWP, CGI, Date::Calc
    • Tcl 8.4.9
    • Tk 8.4.9
    • PHP 4.4.0 with Oracle
    • Java 2 Standard Edition 1.4.2-08
    • Transform
    • Apache web server 1.3.33 (web programming only) or Apache web server 1.3.33 with mod_perl-1.29, php-4.4.0 and mod_jk-1.2.10 (Jakarta Tomcat-Apache connector for web/database programming)
    • Oracle Client 9.2.0, including SQL*Plus, configured to connect to the Oracle RDBMS backend
    • Jakarta Tomcat 4.1.31
    • JDBC (JDK 1.2.2)

The following client tier and database server tier are available for web-database programming:

Client tier

The client tier consists of the IU Bloomington STCs. Available resources include:

  • Web browsers
  • Oracle's SQL*Plus for testing SQL queries before placing them in Java programs

Students can also access Mentor or the Oracle database from their networked personal computers using an SSH client or the Oracle client software, respectively:

Database server tier

The server tier consists of a Linux server, Dbserv, hosting an Oracle 10.2 database named Oed1. For more, see EDSS services for IU instructional use of Oracle.

General tips on Mentor accounts

  • To access your account, use SSH2 to connect to mentor.ucs.indiana.edu, using your Mentor username and password (telnet access to Mentor is not available).

  • Direct printing is not available from Mentor. To print a file, open the file in a browser, view the document source, and print.

  • Disk space usage by account is available from the Mentor instructional environment account data page.

    Data are collected weekly and averaged. Disk space units are in kilobytes.

  • Place .class files in your ~/www/WEB-INF/classes directory.

    Note: The  ~  (tilde) stands for your home login directory.

  • Place .jsp, .html, and .pl files in your ~/www directory.

  • To start Apache (and Tomcat), use the following command: /usr/local/bin/cmd_apache_tomcat start
  • To stop Apache (and Tomcat), use the following command: /usr/local/bin/cmd_apache_tomcat stop
  • To shut down and restart Apache (and Tomcat), use the following command: /usr/local/bin/cmd_apache_tomcat restart
  • To access your Apache account pages (without Tomcat) through a browser, go to: http://mentor.ucs.indiana.edu/~username/filename

    To get to your directory index, you can also go to:

    http://mentor.ucs.indiana.edu/~username/

    For the above examples, substitute your account name for username and your specific file for filename.

  • To set up a site for Dreamweaver, specify your address as: http://mentor.ucs.indiana.edu/~username

    For your host directory, enter:

    /ip/username/www/

    Substitute your account name for username.

  • In order to use Transform, you must first install it in your account:

    1. Log in and change to the directory where you will store your forms (e.g., ~/www/forms).
    2. At the prompt, enter tf_install to install Transform. You should install Transform in every directory where you will keep forms.

  • To access your HTML pages and Perl applications through the web, go to: http://mentor.ucs.indiana.edu:yourport/yourfilename

    Replace yourport with your account's first port number and yourfilename with the name of your file.

  • Apache logs are found in the logs directory off of your home directory (~/logs).

Tips on using Tomcat

  • To run a servlet from a web browser, go to: http://mentor.ucs.indiana.edu:yourport/servlet/yourservlet

    Replace yourport with your account's first port number and yourservlet with the name of your servlet.

  • For information regarding the "class not found" issue for Tomcat, see the Tomcat FAQ.

  • The basic connection string to Oracle database Oed1 is: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dbserv.uits.indiana.edu:1521:oed1","username","password");
  • Port numbers are assigned for Tomcat accounts, and you must know your port number to access your servlets and pages over the web. If you lose your port number, you can find it at the Mentor instructional environment account data page.

  • To avoid having to restart Tomcat after modifying a servlet, add reloadable="true" to the context path in your server.xml file.

  • To use JDBC:

    1. Create a directory called lib in ~/www/WEB-INF.
    2. Copy the following files to the new lib directory: /ip/oracle/home/jdbc/lib/classes12.jar /ip/oracle/home/jdbc/lib/classes12.zip /ip/oracle/home/jdbc/lib/ojdbc14.jar

Tips on using CGI, PHP, or Perl

  • To run CGI scripts from your account:

    1. Put the script in your www directory or any of its subdirectories.

    2. Name your script with a suffix of either .pl or .cgi.

    3. Set the file permissions to read, write, and execute for the owner only by entering chmod 700 filename . Replace filename with the name of your script.

    4. Test your script from the command line to catch errors. If you have a Tomcat account, you can check your own log files for error messages produced from accessing your script via the web.

  • The option "Global_registers" is turned off for PHP, which may require some changes to your scripts.

  • The "shebang" ( #! ) line is required for PHP, because PHP is installed for CGI use.

  • For information about PHP on the IU central servers, see the IU Webmaster's PHP server-side scripting language page.

  • To view the HTML pages and Perl applications hosted on your Tomcat account, go to: http://mentor.ucs.indiana.edu:port#/yourfilename

    Substitute your account's first port number for port# and the filename for yourfilename.

Server downtimes

Mentor is offline each Saturday 5-5:30am. The reserved maintenance time (if needed) is Sunday 1-6am. For updates, visit the Mentor instructional environment page.

UITS backs up information from Oed1 to disk and to tape daily. To accomplish the backup, Oed1 is shut down each day at 5am and is available no later than 7am. In the event of a system failure, UITS can restore Oed1 to the point of the last good backup, which is usually from that morning. UITS cannot promise up-to-the-minute recovery of accounts. Further, UITS does not offer recovery of data for individual accounts in cases where data loss is the result of user error. UITS encourages you to maintain copies of all scripts as a sensible measure.

Documentation links

For general information on the various technologies used in the instructional web programming environment on Mentor, see:

Contact information

If you are a student, contact your instructor if you encounter problems with the environment. To help your instructor and UITS isolate the problem, be sure to include specific information about the nature of the problem and include all details that can help diagnose it. Your instructor will contact UITS if the problem involves the server environment.

This is document anix in domain all.
Last modified on November 11, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.