diff --git a/src/main/java/de/hsel/itech/db/Database.java b/src/main/java/de/hsel/itech/db/Database.java index 44faa36..175c1a0 100644 --- a/src/main/java/de/hsel/itech/db/Database.java +++ b/src/main/java/de/hsel/itech/db/Database.java @@ -35,8 +35,8 @@ public class Database { String hello = ""; try { + assert connection != null; PreparedStatement statement = connection.prepareStatement("SELECT * FROM test WHERE id = 1"); - ResultSet resultSet = statement.executeQuery(); resultSet.next(); hello = resultSet.getString("hello"); diff --git a/src/main/java/de/hsel/itech/HelloWorld.java b/src/main/java/de/hsel/itech/servlet/HelloWorld.java similarity index 97% rename from src/main/java/de/hsel/itech/HelloWorld.java rename to src/main/java/de/hsel/itech/servlet/HelloWorld.java index 0d49078..b22757d 100644 --- a/src/main/java/de/hsel/itech/HelloWorld.java +++ b/src/main/java/de/hsel/itech/servlet/HelloWorld.java @@ -1,4 +1,4 @@ -package de.hsel.itech; +package de.hsel.itech.servlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 45371a9..391a545 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -7,7 +7,7 @@ helloWorld - de.hsel.itech.HelloWorld + de.hsel.itech.servlet.HelloWorld