Create a Web Application in WinSCP

Download the latest stable release (do not download a beta) from this link: WinSCP

Install and run. Click the New button to connect to a remote server.

Fill in the information to connect to ocelot.

  1. Host Name: ocelot.aul.fiu.edu
  2. Port: 22
  3. User Name: your Panther mail user ID
  4. Password: it will start as first initial followed by pid followed by last initial (fpidl)
  5. Protocol: SFTP (allow SCP fallback)

Click Save to save this information.

Click the Login button to connect.

Once you are connected, you will see two file lists: the one on the left contains the files for the local machine; the one on the right contains the files for the remote machine.

At the bottom of the screen are links that perform common operations. The links include the function keys that do the same task.

  1. F2 Rename
  2. F4 Edit
  3. F5 Copy
  4. F6 Move
  5. F7 Create Directory
  6. F8 Delete
  7. F9 Properties
  8. F10 Quit

Change the action associated with double-clicking a file. The default is Open, which only creates a copy of the file on the local system. Change this action to Edit. Open the preferences from the Options -> Preferences menu. Under the Environment heading, select Panels. Change the Double-click action to Edit.

Open the Terminal with Commands -> Open Terminal (Ctrl-T) or click on the Terminal icon.

Issue the command that will allow Tomcat access to your files: chmod  701  ~

Close the Terminal.

Edit the .cshrc file so that files and directories will be created with the correct permissions. Right click the file name and select Edit. Do not select Open, as this will only make a copy on the local machine and will not upload it back to ocelot. If you have set up the preferences properly, then a double-click will edit the file.

Scroll to the bottom of the file and add the command that will set the correct permissions for new files and directories: umask 072

This command will not change the permission on existing files, so it is imperative that you set this before you create any files or directories.

Very Important

You must now disconnect the session and then connect again. This will implement the umask change. If you don't do this, then all the files and directories that you create will have the wrong permissions.

Reconnect to ocelot. If you saved the information from the first login, then you can load those value and connect.

The tree view is very handy when creating web applications. It allows you to see the structure that you are creating.

Click in the lower right hand pane (where the remote files are listed) and press the F7 key to create a directory named cgs4854.

Double-click the new directory: it is empty.

Click F7 again to create a directory named webapps.

Double-click the webapps directory.

This is the directory that will contain the two web applications that you are creating: ROOT and manager.

Follow these steps to create the directory structure for the web application.

  1. In the webapps directory, create a directory named ROOT. This is the root directory of the ROOT web application.
  2. Change to the ROOT directory.
  3. Create a directory name WEB-INF.
  4. Change to the WEB-INF directory.
  5. Create two directories: classes and lib.

After you have completed these steps, the tree view should have the following structure.

It is time to create the web.xml file for the ROOT web application. This uses the secure web.xml file.

Right-click in an empty area of the WEB-INF directory pane and create a file named web.xml.

Copy the contents of the secure web.xml into the editor window that appears. [If you are using Internet Explorer, then be sure to view the source and copy that (View -> Source).]

The ROOT web application appears to be complete, so test it at http://www.cs.fiu.edu/~downeyt/cgi-bin/upload/webappsTest.cgi

The ROOT web application is not yet complete. You need to edit the web.xml file and replace all occurrences of your-user-name with your ocelot user name.

Save the changes and test the file again.

Your ROOT web application is now complete.

Repeat similar steps to create the manager web application. The only differences are:

  1. The root of the web application is named manager.
  2. The web.xml file should use the manager web.xml file. You still need to edit it and replace your-user-name.

After you complete the manager web application and get no errors, send me an email and I will send you your student host number. I will set up your host on Tomcat, and will let you know what your URL is to access your web application folder. They will all be similar. For example, I have a web application folder at student01.cgs4854.cs.fiu.edu on port 8008. You will be given a similar URL. The only thing that will be different is the two-digit student number in the URL.

You will use two URLs to access your folder:

  1. http://studentXX.cgs4854.cs.fiu.edu:8008/ - this is the URL for the ROOT web app.
  2. http://studentXX.cgs4854.cs.fiu.edu:8008/manager/html - this is the URL to manage your web applications.

After you notify me, I will tell you what your two-digit student number is for your URLs.


Some students complain that changes that are uploaded to ocelot are not implemented. This is due to a difference between the clock on your local system and the clock on ocelot. If your clock on the local system is slow, then the browser might use an old file on the system. There are two ways to change this:

  1. Play with the time on your local system.
  2. Change the preferences in winscp so that it does not preserve the time stamp from your system.

To implement the second option, open Options -> Preferences and select Transfer. Under Common Options, uncheck the Preserve Timestamp box.