Added some logging and moved cookie stuff to the manager

This commit is contained in:
Ziver Koc 2018-08-04 18:42:46 +02:00
parent 8e56ff406a
commit a4eb5c613d
9 changed files with 255 additions and 244 deletions

View file

@ -44,7 +44,7 @@ public class Zallery extends HttpServlet{
try {
Context context = new InitialContext();
// Check if Zallery has been properly configured
if ("PATH TO DATA FOLDER".equals(context.lookup("java:comp/env/DATA_PATH")))
if (((String) context.lookup("java:comp/env/DATA_PATH")).isEmpty())
throw new ServletException("Zallery has not been properly configured, set proper configuration in Zallery.xml context file.");
WEBSITE_NAME = (String)context.lookup("java:comp/env/WEBSITE_NAME");
@ -72,7 +72,7 @@ public class Zallery extends HttpServlet{
try {
return new DBConnection("jdbc/mysql");
} catch (Exception e) {
throw new ServletException(e);
throw new ServletException("Was unable to initialize DB connection", e);
}
}