Student Project Server Documentation
Note: You may not be using all of the following options for your course. These instructions are listed for any courses requiring them.
- Using the Linux System
- Accessing the MySQL Database
- Using Java and MySQL
- Using JSP
- Using PHP
- Using RMI
- This documentation is for all students doing course projects on the student.athabascau.ca server.
You must use ssh to log in at student.athabascau.ca. (SSH Information Site) If you don't have a login name and password, please contact SCIS technical team. The student server uses a Linux platform. (Linux is a version of UNIX.) (Help for basic UNIX commands)
- You can use an SCP program (such as WinSCP) to transfer your files to your home directory on the student.athabascau.ca server.
- Once you are logged in, you will be in your home directory. The path to this directory is /home/login. Note: In place of login, enter your own login name.
- You will place any HTML documents in a subdirectory of your home directory called public_html (/home/login/public_html). To access these from the Web, the URL will be http://student.athabascau.ca/~login/filename. Note: Enter your login name and the filename you wish to access.
- Your permissions are set to your home directory so that HTML files can be viewed from the Web, but other users on the server will not be able to change to your directory and read or write to your files. Do not copy from other students' directories! All student access is monitored and logged.
- You may use the command line editors such as vi or pico to edit both your HTML and source code documents. If you edit documents on your windows machine and transfer them to the server, you need to ensure that your Windows editor has not added extra Windows return characters to your source code, as this will interfere with executing your files on the server. A simple HTML file editor that can be used for either HTML files or source code is available from the HTML Editor Page. Under 'Options', select 'Save as Unix Text'.
- A database has been created, which has the same name as your login and home directory. Type
mysql -p databasename
to use the mysql command line monitor (where databasename is your database (login) name). You will be prompted for your password.
- Once you are in your MySQL database, type \h (for HELP) to get the basic command list. \q is the command to quit. The other commands can be found in the MySQL Reference Manual below.
- MySQL Reference Manual
- To create tables and table entries, follow the instructions given in your course materials and in the reference materials above.
- You are the only one who can read or write to your database from the command line.
- Note: Due to connection issues, we no longer recommend using a graphical client to connect to your database, such as MySQL CC, via SSH tunneling.
Warning: Do not attempt to change either your MySQL password or your user configuration in the mysql database. These have been set to enable access from both the Web and the command line and changes made can result in loss of that access. If you feel that permissions need to be changed, please contact the SCIS technical team.
- To compile your Java programs, you should no longer need to set your PATH to java or CLASSPATH to servlet.jar and the jdbc connector. This should be set for you. If you encounter problems with this, email the SCIS Programmers.
- The driver used is MM.MySQL, which is a Type-4 JDBC driver. It allows Java developers to make connections to MySQL servers from both Java applications and applets. On IO, you will be making your connections using Java servlets.
- Servlets run on the Apache Tomcat 5 module, which is an implementation of the Java Servlet 2.2 and JavaServer Pages 1.1 Specifications.
- The servlet development and production zone is under the path
/usr/local/etc/httpd/htdocs/WEB-INF/classes/LOGIN (where LOGIN is your login name).
The URL for servlets in this zone is http://student.athabascau.ca/servlet/SERVLETNAME.
You have your own subdirectory under this path, which has the same name as your login name. This requires that you start your program referencing your code as a package. For example, the demo code is in a subdirectory called 'db'. The program code starts out with:
The servlet is referenced using that package name as: http://student.athabascau.ca/servlet/db.ConnMySQL
In your home directory /home/LOGIN (where LOGIN is your login name) there is a symbolic link WEB_INF_classes_LOGIN which can be used to navigate to /usr/local/etc/httpd/htdocs/WEB-INF/classes/LOGIN directory.
- MySQL Java Database Connect Demo
- For more help and information, check out the following links. Note that most of these reference a different MySQL driver than the one on the IO server.
- JDBCtm Guide: Getting Started
- Sun Tutorial - Lesson: JDBC Basics
- Sun Tutorial - Servlets
- Writing JDBC Applications with MySQL
- JSP will not work from your home directory because the Tomcat server does not recognize your directory as a context. You need to request a directory be created in the path /usr/local/etc/httpd/htdocs/html/LOGIN where you must run all JSP files from. The URL will be http://student.athabascau.ca/html/LOGIN/file.jsp. (Contact the SCIS technical team.)
- JSP-MySQL Connect Demo
- JavaServer Pages Fundamentals
- You will place any PHP files in the 'public_html' subdirectory of your home directory (/home/login/public_html). To access these from the Web, the URL will be http://student.athabascau.ca/~login/filename.php. Note: Substitute your login name and the filename you wish to access.
- PHP Basic and MySQL Connect Demos
- PHP Tutorial
- Because you must use RMI through the AU firewall, you will need to specify the ports for both the client and the server.
- Contact the SCIS technical team to request the port numbers.
- Note that the rmiregistry processes on student.athabascau.ca will be periodically stopped. You may need to restart yours again.
- RMI Through a Firewall
Last Updated July 14, 2014