diff --git a/.classpath b/.classpath index fdb6243..09ba841 100644 --- a/.classpath +++ b/.classpath @@ -6,19 +6,18 @@ - - - + - + + - + - + - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 82df264..4e6902e 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,5 +1,6 @@ - + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index dfd38d9..a3bf73b 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,9 @@ - + - + + diff --git a/WebContent/META-INF/MANIFEST.MF b/WebContent/META-INF/MANIFEST.MF index 5e94951..e29d8ee 100644 --- a/WebContent/META-INF/MANIFEST.MF +++ b/WebContent/META-INF/MANIFEST.MF @@ -1,3 +1,3 @@ Manifest-Version: 1.0 -Class-Path: +Main-Class: com.main.Main diff --git a/WebContent/html/javascript/listing.jsp b/WebContent/html/javascript/listing.jsp index 0d05c48..456db40 100644 --- a/WebContent/html/javascript/listing.jsp +++ b/WebContent/html/javascript/listing.jsp @@ -9,11 +9,11 @@ <% -MySQLAccess myaccess = new MySQLAccess(); +/*MySQLAccess myaccess = new MySQLAccess(); myaccess.connectDB(); String name = myaccess.getResult()[0][0]; String description = myaccess.getResult()[0][1]; -String hardware = myaccess.getResult()[0][2]; +String hardware = myaccess.getResult()[0][2];*/ //out.println(name); //out.println(description); //out.println(hardware); @@ -21,21 +21,23 @@ String hardware = myaccess.getResult()[0][2]; +Welcome to Senior Design Request System! \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c89420d --- /dev/null +++ b/pom.xml @@ -0,0 +1,34 @@ + + 4.0.0 + 2017-CSE-Senior-Project-Team-2 + 2017-CSE-Senior-Project-Team-2 + 0.0.1-SNAPSHOT + + src + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + maven-war-plugin + 3.0.0 + + WebContent + + + + + + + mysql + mysql-connector-java + 5.1.40 + + + war + \ No newline at end of file diff --git a/src/database/MySQLAccess.java b/src/database/MySQLAccess.java index 2b62b32..741889e 100644 --- a/src/database/MySQLAccess.java +++ b/src/database/MySQLAccess.java @@ -7,8 +7,9 @@ public class MySQLAccess { String[][] result = new String[20][3]; public void connectDB() throws SQLException, ClassNotFoundException { + System.getenv("VCAP_SERVICES"); Class.forName("com.mysql.jdbc.Driver"); - Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/seniordesign", "root", "password"); + Connection connect = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/seniordesign", "root", "password"); Statement statement = connect.createStatement(); //PreparedStatement preparedStatement = null; ResultSet resultSet = statement.executeQuery("SELECT * FROM devices"); diff --git a/src/main/Main.java b/src/main/Main.java index b76ceb2..691ab9a 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -8,11 +8,6 @@ public class Main { public static void main(String[] args) { - ClientManager cm = new ClientManager(); - Scanner STDIN = new Scanner(System.in); - SystemManager sm = new SystemManager(); - sm.loginProcess(STDIN); - sm.runMenu(STDIN, cm); } }