A web server (Tomcat 6) with JSP support has already been set up for you. To access it, you should log into your account on newcastle.db.cs.cmu.edu (the one you used for HW2 and HW 6). Please clean up and back up your directory. 1. To create the web directory www, run these two scripts: $ ../etaralova415/setup_db.sh $ ../etaralova415/setup_web.sh If you are prompted about replacing any files, choose the ``[A]ll" option. 2. Create the database hw7, and add user www after starting the pgsql server: $ pg_ctl -w start $ createdb hw7 $ createuser www -P Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) y Note: this user is only for setting up the website. It is not a user of the website. 3. Add table users to the database: $ psql hw7 hw7=# create table users(login_id varchar(32), passwd varchar(64), email varchar(128)); Note: this table is required to run the demo code only. For your submission, you should change the table as to the data and functionality requirements. NEW! 3.5. Import the reduced movie database. After running "psql hw7", from the psql primpt, run: hw7=# \i ../etaralova415/loading.sql 4. Exit the sql environment (\q). Run echo $PGPORT. You should get a port number. Change the port number for localhost in line 37 of www/register.jsp to the one you just got. Change the password in line 37 of www/register.jsp to the one you just entered. Access http://newcastle.db.cs.cmu.edu:8080/415/register.jsp. It should be similar to the sample registration page at http://newcastle.db.cs.cmu.edu:8080/testuser415/register.jsp. After setup, every time you login, you can start the postgresql server by running pg_ctl -w start Every time when you logout, you must stop the postgresql server by running pg_ctl stop