diff --git a/pages/register.html b/pages/register.html index bb17637..198dc47 100644 --- a/pages/register.html +++ b/pages/register.html @@ -1,5 +1,37 @@
Hello
+The page \"" + page.GetName() + "\" cannot be found on disk.",
exchange);
- return false;
+ return null;
}
FileInputStream inputStream = new FileInputStream(file);
String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- SendResponse(code, content, exchange);
- return true;
+ return content;
}
}
diff --git a/src/io/github/norbipeti/chat/server/Main.java b/src/io/github/norbipeti/chat/server/Main.java
index 8c4a111..f7de172 100644
--- a/src/io/github/norbipeti/chat/server/Main.java
+++ b/src/io/github/norbipeti/chat/server/Main.java
@@ -5,9 +5,6 @@ import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.Set;
-import javax.persistence.EntityManager;
-
-import org.hibernate.Hibernate;
import org.reflections.Reflections;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
@@ -36,6 +33,7 @@ public class Main {
user2.getContacts().add(user.getId());
provider.addUser(user2);
System.out.println(provider.getUsers());
+ System.out.println("Contact: " + provider.getUser(user2.getContacts().get(0)));
}
System.out.println("Starting webserver...");
HttpServer server = HttpServer.create(new InetSocketAddress(InetAddress.getLocalHost(), 8080), 10);
diff --git a/src/io/github/norbipeti/chat/server/db/DataProvider.java b/src/io/github/norbipeti/chat/server/db/DataProvider.java
index 4abbb38..63a617b 100644
--- a/src/io/github/norbipeti/chat/server/db/DataProvider.java
+++ b/src/io/github/norbipeti/chat/server/db/DataProvider.java
@@ -36,12 +36,12 @@ public class DataProvider implements AutoCloseable {
return users;
}
- public List