Skip to content

5-Star-Users/CS4800Fall19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Professors' OfficeHours Search Web Service

Link: http://professorhours.com:8080/OfficeHours/

This web service allows students to search for all their professors' office hours not limitted to their classes. It will help students to visit their professors even if they are not currently taking those classes.

Slides

Environment Setup Requirements

  1. Maven
  2. latest mySQL server
  3. Tomcat
    • Shortcut
      • For MacOS, use homebrew to install globally in terminal
        brew install tomcat
        
      • Install Tomcat on Windows can be easily done via installer
      • Linux....
  4. Ecilpse
  5. Install the Maven Eclipse Plug-in using the update site (http://www.eclipse.org/m2e/download/)

Setup mySQL server

Follow the script

  mysql -uroot -p
  [enter your password]
  
  create database OfficeHours;
  use OfficeHours;
  show tables;

  Create Table Department(
  DepartmentName Varchar(30) Primary Key,
  CollegeName Varchar(30)
  );

  Create Table Faculty(
  FacultyId Int Primary Key,
  FirstName Varchar(30),
  LastName Varchar(30),
  PhoneNumber Varchar(20),
  EmailAddress Varchar(30),
  OfficeLocation Varchar(30),
  DepartmentName Varchar(30),
  PassPhrase Varchar(130),
  Foreign Key (DepartmentName) References Department(DepartmentName)
  );


  Create Table OfficeHour(
  FacultyId Int,
  DayTime Varchar(100),
  Comment Varchar(60),
  Primary Key(FacultyId, DayTime),
  Foreign Key (FacultyId) References Faculty(FacultyId)
  );

  Create Table Section(
  Semester Varchar(30),
  CourseTitle Varchar(30),
  Section Varchar(10),
  FacultyId Int,
  DayTime Varchar(30),
  RoomLocation Varchar(30),
  Primary Key(Semester, CourseTitle, Section, FacultyId),
  Foreign Key (FacultyId) References Faculty(FacultyId)
  );

  Select * From Department;
  Select * From Faculty;
  Select * From OfficeHour;
  Select * From Course;
  Select * From Section;
  
  Set Local_infile = "ON";

  Load Data Local Infile '[$YOUR_PATH]/CS4800Fall19/mysql/Department.txt' Into Table Department;
  Load Data Local Infile '[$YOUR_PATH]/CS4800Fall19/mysql/Faculty.txt' Into Table Faculty;
  Load Data Local Infile '[$YOUR_PATH]/CS4800Fall19/mysql/OfficeHour.txt' Into Table OfficeHour;
  Load Data Local Infile '[$YOUR_PATH]/CS4800Fall19/mysql/Section.txt' Into Table Section;

NOTE: There are some issues with load data local infile for some people, we are currently doing more research on that

Alternative way is to import the database using OfficeHours.sql in the mysql folder

Importing the Project into Eclipse

  1. File->Import->Maven->Existing Maven Projects
  2. Select the directory containing the pom.xml file
  3. Finish

Running the Project Locally

  1. On the directory that contain pom.xml

    mvn package
    
  2. OfficeHours.war will be built inside tatget folder. Copy OfficeHours.war to where your Tomcat folder is. Put it in webapps folder.

  3. To verify:

    Note: Tomcat needs to be reconfigured for SSL. Please use this guiline https://dzone.com/articles/setting-ssl-tomcat-5-minutes

    It should look similar to this:

    To be updated in the future

About

A web service that allow students to search for their professor's office hours

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages