core functionality should also use the modules system, changed the code structure accordingly

Tue, 28 Nov 2017 18:59:13 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 28 Nov 2017 18:59:13 +0100
changeset 7
598670d5b0b8
parent 6
da61a1646eba
child 8
2dfdb79b5344

core functionality should also use the modules system, changed the code structure accordingly

.hgignore file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/Constants.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/Functions.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/HomeServlet.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/LightPITModule.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/LightPITServlet.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/ModuleManager.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/modules/HomeModule.java file | annotate | diff | comparison | revisions
src/java/de/uapcore/lightpit/modules/VersionsModule.java file | annotate | diff | comparison | revisions
web/index.jsp file | annotate | diff | comparison | revisions
     1.1 --- a/.hgignore	Sun Nov 26 18:09:23 2017 +0100
     1.2 +++ b/.hgignore	Tue Nov 28 18:59:13 2017 +0100
     1.3 @@ -1,6 +1,7 @@
     1.4  syntax: regexp
     1.5  ^nbproject/private/
     1.6  ^build/
     1.7 +^dist/
     1.8  \.orig\..*$
     1.9  \.orig$
    1.10  \.chg\..*$
     2.1 --- a/src/java/de/uapcore/lightpit/Constants.java	Sun Nov 26 18:09:23 2017 +0100
     2.2 +++ b/src/java/de/uapcore/lightpit/Constants.java	Tue Nov 28 18:59:13 2017 +0100
     2.3 @@ -32,5 +32,7 @@
     2.4   * Contains all constants used by the this application.
     2.5   */
     2.6  public abstract class Constants {
     2.7 +    public static final String HOME_NODE = "/home/";
     2.8 +    
     2.9      public static final String JSP_PATH_PREFIX = "/WEB-INF/view/";
    2.10  }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/java/de/uapcore/lightpit/Functions.java	Tue Nov 28 18:59:13 2017 +0100
     3.3 @@ -0,0 +1,39 @@
     3.4 +/*
     3.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     3.6 + * 
     3.7 + * Copyright 2017 Mike Becker. All rights reserved.
     3.8 + * 
     3.9 + * Redistribution and use in source and binary forms, with or without
    3.10 + * modification, are permitted provided that the following conditions are met:
    3.11 + *
    3.12 + *   1. Redistributions of source code must retain the above copyright
    3.13 + *      notice, this list of conditions and the following disclaimer.
    3.14 + *
    3.15 + *   2. Redistributions in binary form must reproduce the above copyright
    3.16 + *      notice, this list of conditions and the following disclaimer in the
    3.17 + *      documentation and/or other materials provided with the distribution.
    3.18 + *
    3.19 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    3.20 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    3.21 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    3.22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    3.23 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    3.24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    3.25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    3.26 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    3.27 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    3.28 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    3.29 + * POSSIBILITY OF SUCH DAMAGE.
    3.30 + * 
    3.31 + */
    3.32 +package de.uapcore.lightpit;
    3.33 +
    3.34 +/**
    3.35 + * Contains common static functions.
    3.36 + */
    3.37 +public class Functions {
    3.38 +
    3.39 +    public static String jspPath(String filename) {
    3.40 +        return Constants.JSP_PATH_PREFIX + filename;
    3.41 +    }
    3.42 +}
     4.1 --- a/src/java/de/uapcore/lightpit/HomeServlet.java	Sun Nov 26 18:09:23 2017 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,78 +0,0 @@
     4.4 -/*
     4.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4.6 - * 
     4.7 - * Copyright 2017 Mike Becker. All rights reserved.
     4.8 - * 
     4.9 - * Redistribution and use in source and binary forms, with or without
    4.10 - * modification, are permitted provided that the following conditions are met:
    4.11 - *
    4.12 - *   1. Redistributions of source code must retain the above copyright
    4.13 - *      notice, this list of conditions and the following disclaimer.
    4.14 - *
    4.15 - *   2. Redistributions in binary form must reproduce the above copyright
    4.16 - *      notice, this list of conditions and the following disclaimer in the
    4.17 - *      documentation and/or other materials provided with the distribution.
    4.18 - *
    4.19 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    4.20 - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    4.21 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    4.22 - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    4.23 - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    4.24 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    4.25 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    4.26 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    4.27 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    4.28 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    4.29 - * POSSIBILITY OF SUCH DAMAGE.
    4.30 - * 
    4.31 - */
    4.32 -package de.uapcore.lightpit;
    4.33 -
    4.34 -import java.io.IOException;
    4.35 -import javax.servlet.RequestDispatcher;
    4.36 -import javax.servlet.ServletContext;
    4.37 -import javax.servlet.ServletException;
    4.38 -import javax.servlet.annotation.WebServlet;
    4.39 -import javax.servlet.http.HttpServlet;
    4.40 -import javax.servlet.http.HttpServletRequest;
    4.41 -import javax.servlet.http.HttpServletResponse;
    4.42 -
    4.43 -/**
    4.44 - * Entry point for the application.
    4.45 - */
    4.46 -@WebServlet(
    4.47 -        name = "HomeServlet",
    4.48 -        urlPatterns = {"/", "/home"}
    4.49 -)
    4.50 -public class HomeServlet extends HttpServlet {
    4.51 -    
    4.52 -    private String jspPath(String filename) {
    4.53 -        return Constants.JSP_PATH_PREFIX + filename;
    4.54 -    }
    4.55 -
    4.56 -    @Override
    4.57 -    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
    4.58 -            throws ServletException, IOException {
    4.59 -        
    4.60 -        ServletContext ctx = getServletContext();
    4.61 -        RequestDispatcher dispatcher = ctx.getRequestDispatcher(jspPath("home.jsp"));
    4.62 -        dispatcher.forward(req, resp);
    4.63 -    }
    4.64 -
    4.65 -    @Override
    4.66 -    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
    4.67 -            throws ServletException, IOException {
    4.68 -        resp.sendError(HttpServletResponse.SC_FORBIDDEN,
    4.69 -                "POST method not allowed for this Servlet.");
    4.70 -    }
    4.71 -
    4.72 -    /**
    4.73 -     * Returns a short description of the servlet.
    4.74 -     *
    4.75 -     * @return a String containing servlet description
    4.76 -     */
    4.77 -    @Override
    4.78 -    public String getServletInfo() {
    4.79 -        return "Processes requests for the LightPIT start page.";
    4.80 -    }
    4.81 -}
     5.1 --- a/src/java/de/uapcore/lightpit/LightPITModule.java	Sun Nov 26 18:09:23 2017 +0100
     5.2 +++ b/src/java/de/uapcore/lightpit/LightPITModule.java	Tue Nov 28 18:59:13 2017 +0100
     5.3 @@ -28,17 +28,34 @@
     5.4   */
     5.5  package de.uapcore.lightpit;
     5.6  
     5.7 +import java.lang.annotation.Documented;
     5.8  import java.lang.annotation.ElementType;
     5.9  import java.lang.annotation.Retention;
    5.10  import java.lang.annotation.RetentionPolicy;
    5.11  import java.lang.annotation.Target;
    5.12 +import javax.servlet.annotation.WebServlet;
    5.13  
    5.14  
    5.15  /**
    5.16   * Contains information about a LightPIT module.
    5.17 + * 
    5.18 + * This annotation is typically used to annotate the {@link WebServlet} which
    5.19 + * implements the module's functionality.
    5.20   */
    5.21 +@Documented
    5.22  @Retention(RetentionPolicy.RUNTIME)
    5.23  @Target(ElementType.TYPE)
    5.24  public @interface LightPITModule {
    5.25 +    /**
    5.26 +     * Base name of the module specific resource bundle.
    5.27 +     * @return a base name suitable for the JSTL tag 'setBundle'.
    5.28 +     */
    5.29 +    String bundleBaseName();
    5.30      
    5.31 +    /**
    5.32 +     * An array of required modules, identified by the string representation of
    5.33 +     * their class names.
    5.34 +     * @return an array of class names of required modules
    5.35 +     */
    5.36 +    String[] requires() default {};
    5.37  }
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/src/java/de/uapcore/lightpit/LightPITServlet.java	Tue Nov 28 18:59:13 2017 +0100
     6.3 @@ -0,0 +1,55 @@
     6.4 +/*
     6.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.6 + * 
     6.7 + * Copyright 2017 Mike Becker. All rights reserved.
     6.8 + * 
     6.9 + * Redistribution and use in source and binary forms, with or without
    6.10 + * modification, are permitted provided that the following conditions are met:
    6.11 + *
    6.12 + *   1. Redistributions of source code must retain the above copyright
    6.13 + *      notice, this list of conditions and the following disclaimer.
    6.14 + *
    6.15 + *   2. Redistributions in binary form must reproduce the above copyright
    6.16 + *      notice, this list of conditions and the following disclaimer in the
    6.17 + *      documentation and/or other materials provided with the distribution.
    6.18 + *
    6.19 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    6.20 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    6.21 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    6.22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    6.23 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    6.24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    6.25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    6.26 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    6.27 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    6.28 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    6.29 + * POSSIBILITY OF SUCH DAMAGE.
    6.30 + * 
    6.31 + */
    6.32 +package de.uapcore.lightpit;
    6.33 +
    6.34 +import java.io.IOException;
    6.35 +import javax.servlet.ServletException;
    6.36 +import javax.servlet.http.HttpServlet;
    6.37 +import javax.servlet.http.HttpServletRequest;
    6.38 +import javax.servlet.http.HttpServletResponse;
    6.39 +
    6.40 +/**
    6.41 + * A special implementation of a HTTPServlet which is focused on implementing
    6.42 + * the necessary functionality for {@link LightPITModule}s.
    6.43 + */
    6.44 +public class LightPITServlet extends HttpServlet {
    6.45 +    
    6.46 +    @Override
    6.47 +    protected final void doGet(HttpServletRequest req, HttpServletResponse resp)
    6.48 +            throws ServletException, IOException {
    6.49 +        
    6.50 +        resp.getWriter().println("It works!");
    6.51 +    }
    6.52 +
    6.53 +    @Override
    6.54 +    protected final void doPost(HttpServletRequest req, HttpServletResponse resp)
    6.55 +            throws ServletException, IOException {
    6.56 +    }
    6.57 +    
    6.58 +}
     7.1 --- a/src/java/de/uapcore/lightpit/ModuleManager.java	Sun Nov 26 18:09:23 2017 +0100
     7.2 +++ b/src/java/de/uapcore/lightpit/ModuleManager.java	Tue Nov 28 18:59:13 2017 +0100
     7.3 @@ -30,10 +30,10 @@
     7.4  
     7.5  import java.util.logging.Level;
     7.6  import java.util.logging.Logger;
     7.7 +import javax.servlet.Registration;
     7.8  import javax.servlet.ServletContext;
     7.9  import javax.servlet.ServletContextEvent;
    7.10  import javax.servlet.ServletContextListener;
    7.11 -import javax.servlet.ServletRegistration;
    7.12  import javax.servlet.annotation.WebListener;
    7.13  
    7.14  /**
    7.15 @@ -66,20 +66,34 @@
    7.16          unloadAll();
    7.17      }
    7.18      
    7.19 -    private boolean isRegisteredAsModule(ServletRegistration sr) {
    7.20 +    private boolean isRegisteredAsModule(Registration reg) {
    7.21          try {
    7.22 -            final Class scclass = Class.forName(sr.getClassName());
    7.23 -            return scclass.isAnnotationPresent(LightPITModule.class);
    7.24 +            final Class scclass = Class.forName(reg.getClassName());
    7.25 +            
    7.26 +            final boolean lpservlet = LightPITServlet.class.isAssignableFrom(scclass);
    7.27 +            final boolean lpmodule = scclass.isAnnotationPresent(LightPITModule.class);
    7.28 +            
    7.29 +            if (lpservlet && !lpmodule) {
    7.30 +                LOG.log(Level.WARNING,
    7.31 +                    "Servlet is a LightPITServlet but is missing the module annotation: {0}",
    7.32 +                    reg.getClassName());
    7.33 +            } else if (!lpservlet && lpmodule) {
    7.34 +                LOG.log(Level.WARNING,
    7.35 +                    "Servlet is annotated as a LightPITModule but does not extend LightPITServlet: {0}",
    7.36 +                    reg.getClassName());
    7.37 +            }
    7.38 +            
    7.39 +            return lpservlet && lpmodule;
    7.40          } catch (ClassNotFoundException ex) {
    7.41              LOG.log(Level.SEVERE,
    7.42                      "Servlet registration refers to a class which cannot be found by the class loader: {0}",
    7.43 -                    sr.getClassName());
    7.44 +                    reg.getClassName());
    7.45              return false;
    7.46          }        
    7.47      }
    7.48      
    7.49 -    private void handleServletRegistration(String name, ServletRegistration sr) {
    7.50 -        if (isRegisteredAsModule(sr)) {
    7.51 +    private void handleServletRegistration(String name, Registration reg) {
    7.52 +        if (isRegisteredAsModule(reg)) {
    7.53              LOG.log(Level.CONFIG, "Module detected: {0}", name);
    7.54          } else {
    7.55              LOG.log(Level.FINE, "Servlet {0} is no module, skipping.", name);
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/src/java/de/uapcore/lightpit/modules/HomeModule.java	Tue Nov 28 18:59:13 2017 +0100
     8.3 @@ -0,0 +1,48 @@
     8.4 +/*
     8.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     8.6 + * 
     8.7 + * Copyright 2017 Mike Becker. All rights reserved.
     8.8 + * 
     8.9 + * Redistribution and use in source and binary forms, with or without
    8.10 + * modification, are permitted provided that the following conditions are met:
    8.11 + *
    8.12 + *   1. Redistributions of source code must retain the above copyright
    8.13 + *      notice, this list of conditions and the following disclaimer.
    8.14 + *
    8.15 + *   2. Redistributions in binary form must reproduce the above copyright
    8.16 + *      notice, this list of conditions and the following disclaimer in the
    8.17 + *      documentation and/or other materials provided with the distribution.
    8.18 + *
    8.19 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    8.20 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    8.21 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    8.22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    8.23 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    8.24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    8.25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    8.26 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    8.27 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    8.28 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    8.29 + * POSSIBILITY OF SUCH DAMAGE.
    8.30 + * 
    8.31 + */
    8.32 +package de.uapcore.lightpit.modules;
    8.33 +
    8.34 +import de.uapcore.lightpit.Constants;
    8.35 +import de.uapcore.lightpit.LightPITModule;
    8.36 +import de.uapcore.lightpit.LightPITServlet;
    8.37 +import javax.servlet.annotation.WebServlet;
    8.38 +
    8.39 +/**
    8.40 + * Entry point for the application.
    8.41 + */
    8.42 +@LightPITModule(
    8.43 +        bundleBaseName = "de.uapcore.lightpit.resources.home_localization"
    8.44 +)
    8.45 +@WebServlet(
    8.46 +        name = "HomeModule",
    8.47 +        urlPatterns = Constants.HOME_NODE+"*"
    8.48 +)
    8.49 +public class HomeModule extends LightPITServlet {
    8.50 +    
    8.51 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/src/java/de/uapcore/lightpit/modules/VersionsModule.java	Tue Nov 28 18:59:13 2017 +0100
     9.3 @@ -0,0 +1,45 @@
     9.4 +/*
     9.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.6 + * 
     9.7 + * Copyright 2017 Mike Becker. All rights reserved.
     9.8 + * 
     9.9 + * Redistribution and use in source and binary forms, with or without
    9.10 + * modification, are permitted provided that the following conditions are met:
    9.11 + *
    9.12 + *   1. Redistributions of source code must retain the above copyright
    9.13 + *      notice, this list of conditions and the following disclaimer.
    9.14 + *
    9.15 + *   2. Redistributions in binary form must reproduce the above copyright
    9.16 + *      notice, this list of conditions and the following disclaimer in the
    9.17 + *      documentation and/or other materials provided with the distribution.
    9.18 + *
    9.19 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    9.20 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    9.21 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    9.22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    9.23 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    9.24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    9.25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    9.26 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    9.27 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    9.28 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    9.29 + * POSSIBILITY OF SUCH DAMAGE.
    9.30 + * 
    9.31 + */
    9.32 +package de.uapcore.lightpit.modules;
    9.33 +
    9.34 +import de.uapcore.lightpit.LightPITModule;
    9.35 +import de.uapcore.lightpit.LightPITServlet;
    9.36 +import javax.servlet.annotation.WebServlet;
    9.37 +
    9.38 +
    9.39 +@LightPITModule(
    9.40 +        bundleBaseName = "de.uapcore.lightpit.resources.versions_localization"
    9.41 +)
    9.42 +@WebServlet(
    9.43 +        name = "VersionsModule",
    9.44 +        urlPatterns = "/versions/*"
    9.45 +)
    9.46 +public class VersionsModule extends LightPITServlet {
    9.47 +    
    9.48 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/web/index.jsp	Tue Nov 28 18:59:13 2017 +0100
    10.3 @@ -0,0 +1,31 @@
    10.4 +<%-- 
    10.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    10.6 +
    10.7 +Copyright 2017 Mike Becker. All rights reserved.
    10.8 +
    10.9 +Redistribution and use in source and binary forms, with or without
   10.10 +modification, are permitted provided that the following conditions are met:
   10.11 +
   10.12 +1. Redistributions of source code must retain the above copyright
   10.13 +notice, this list of conditions and the following disclaimer.
   10.14 +
   10.15 +2. Redistributions in binary form must reproduce the above copyright
   10.16 +notice, this list of conditions and the following disclaimer in the
   10.17 +documentation and/or other materials provided with the distribution.
   10.18 +
   10.19 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   10.20 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   10.21 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   10.22 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
   10.23 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   10.24 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   10.25 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   10.26 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   10.27 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   10.28 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
   10.29 +--%>
   10.30 +<%@page import="de.uapcore.lightpit.Constants" %>
   10.31 +<%
   10.32 +response.setStatus(response.SC_MOVED_TEMPORARILY);
   10.33 +response.setHeader("Location", "."+Constants.HOME_NODE);
   10.34 +%>

mercurial