updated context.xml and added check if it has been updated
This commit is contained in:
parent
f83be400dc
commit
f6be23ee4b
3 changed files with 27 additions and 26 deletions
|
|
@ -51,6 +51,10 @@ public class Zallery extends HttpServlet{
|
|||
ROOT_PATH = config.getServletContext().getRealPath("/");
|
||||
try {
|
||||
Context context = new InitialContext();
|
||||
// Check if Zallery has been properly configured
|
||||
if ("C:\\\\data".equals(context.lookup("java:comp/env/DATA_PATH")))
|
||||
throw new ServletException("Zallery has not been properly configured, set proper configuration in Zaller.xml context file.");
|
||||
|
||||
WEBSITE_NAME = (String)context.lookup("java:comp/env/WEBSITE_NAME");
|
||||
WEBSITE_URL = (String)context.lookup("java:comp/env/WEBSITE_URL");
|
||||
if( WEBSITE_URL.charAt(WEBSITE_URL.length()-1) != '/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue