~ moved HelloWorld Servlet
~ asserted connection to database Signed-off-by: Johannes Theiner <j.theiner@live.de>
This commit is contained in:
parent
7495f455e2
commit
49287ee2e4
@ -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");
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.hsel.itech;
|
||||
package de.hsel.itech.servlet;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
@ -7,7 +7,7 @@
|
||||
<web-app>
|
||||
<servlet>
|
||||
<servlet-name>helloWorld</servlet-name>
|
||||
<servlet-class>de.hsel.itech.HelloWorld</servlet-class>
|
||||
<servlet-class>de.hsel.itech.servlet.HelloWorld</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
|
Loading…
Reference in New Issue
Block a user