*
- * This file is part of Juga, simple key value database.
+ * This file is part of Kiss4web.
*
- * Juga is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
+ * Kiss4web is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * Juga is distributed in the hope that it will be useful,
+ * Kiss4web is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Affero General Public License
- * along with Juga. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Kiss4web. If not, see
*/
package fr.devinsy.kiss4web;
import java.io.File;
import javax.naming.ConfigurationException;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.core.config.Configurator;
@@ -30,10 +28,19 @@ import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.Kiss4web.Mode;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletContextEvent;
+import jakarta.servlet.ServletContextListener;
+
/**
- * The Class JugaWebLauncher.
+ * The Class Kiss4WebLauncher.
+ *
+ * The Context element represents a web application. If you have implemented a
+ * Java object that needs to know when this Context is started or stopped, you
+ * can declare it by nesting a Listener element inside this element.
*/
-public class Kiss4webLauncher implements javax.servlet.ServletContextListener
+public class Kiss4webLauncher implements ServletContextListener
{
private static Logger logger = LoggerFactory.getLogger(Kiss4webLauncher.class);
@@ -45,13 +52,17 @@ public class Kiss4webLauncher implements javax.servlet.ServletContextListener
{
}
- /* (non-Javadoc)
- * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ /**
+ * {@inheritDoc}
*/
@Override
public void contextInitialized(final ServletContextEvent event)
{
- launch(event.getServletContext());
+ System.out.println("========= KISS4WEB WEBAPP LAUNCHING… ==========");
+ ServletContext context = event.getServletContext();
+ initLogger(context.getRealPath("/"));
+ Kiss4web.instance().setMode(Mode.OPEN);
+ System.out.println("========= KISS4WEB WEBAPP LAUNCHED ==========");
}
/**
@@ -113,10 +124,5 @@ public class Kiss4webLauncher implements javax.servlet.ServletContextListener
*/
public void launch(final ServletContext context)
{
- System.out.println("========= KISS4WEB WEBAPP LAUNCHING… ==========");
-
- initLogger(context.getRealPath("/"));
- Kiss4web.instance();
- System.out.println("========= KISS4WEB WEBAPP LAUNCHED ==========");
}
}
diff --git a/src/fr/devinsy/kiss4web/Page.java b/src/fr/devinsy/kiss4web/Page.java
index 82a4dd9..fdac8df 100644
--- a/src/fr/devinsy/kiss4web/Page.java
+++ b/src/fr/devinsy/kiss4web/Page.java
@@ -20,9 +20,9 @@ package fr.devinsy.kiss4web;
import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class Page.
diff --git a/src/fr/devinsy/kiss4web/Redirector.java b/src/fr/devinsy/kiss4web/Redirector.java
index eb76f1e..eab148c 100644
--- a/src/fr/devinsy/kiss4web/Redirector.java
+++ b/src/fr/devinsy/kiss4web/Redirector.java
@@ -18,11 +18,11 @@
*/
package fr.devinsy.kiss4web;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class Redirector.
*/
diff --git a/src/fr/devinsy/kiss4web/SimpleSecurityAgent.java b/src/fr/devinsy/kiss4web/SimpleSecurityAgent.java
index 753f60b..dc03fbc 100644
--- a/src/fr/devinsy/kiss4web/SimpleSecurityAgent.java
+++ b/src/fr/devinsy/kiss4web/SimpleSecurityAgent.java
@@ -18,14 +18,13 @@
*/
package fr.devinsy.kiss4web;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.strings.StringList;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class SimpleSecurityAgent.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcher.java b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcher.java
index 5f9d1d3..1957156 100755
--- a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcher.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcher.java
@@ -21,17 +21,16 @@ package fr.devinsy.kiss4web.dispatcher;
import java.io.IOException;
import java.util.Date;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.hooks.Hook;
import fr.devinsy.kiss4web.dispatcher.hooks.HookRegister;
import fr.devinsy.kiss4web.dispatcher.hooks.InitHook;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class KissDispatcher.
@@ -161,8 +160,8 @@ public class KissDispatcher extends HttpServlet
logger.debug("TIME: {}ms {}", endTime - startTime, request.getPathInfo());
}
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doDelete(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void doDelete(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
@@ -170,8 +169,8 @@ public class KissDispatcher extends HttpServlet
dispatch(request, response);
}
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
@@ -179,8 +178,8 @@ public class KissDispatcher extends HttpServlet
dispatch(request, response);
}
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void doPost(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
@@ -188,8 +187,8 @@ public class KissDispatcher extends HttpServlet
dispatch(request, response);
}
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doPut(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void doPut(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
@@ -197,8 +196,8 @@ public class KissDispatcher extends HttpServlet
dispatch(request, response);
}
- /* (non-Javadoc)
- * @see javax.servlet.GenericServlet#init()
+ /**
+ * {@inheritDoc}
*/
@Override
public void init() throws ServletException
diff --git a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherCache.java b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherCache.java
index 8ab582a..32ee7dd 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherCache.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherCache.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -20,11 +20,11 @@ package fr.devinsy.kiss4web.dispatcher;
import java.util.HashMap;
-import javax.servlet.http.HttpServlet;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.http.HttpServlet;
+
/**
* The Class KissDispatcherCache.
*/
diff --git a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherFactory.java b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherFactory.java
index c04531b..1b75068 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherFactory.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherFactory.java
@@ -21,15 +21,15 @@ package fr.devinsy.kiss4web.dispatcher;
import java.io.IOException;
import java.io.PrintWriter;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* A factory for creating KissDispatcher objects.
*
@@ -95,6 +95,14 @@ public class KissDispatcherFactory
servlet = KissDispatcherUtils.instanciateServlet("website." + className.replaceAll("Xhtml$", "Page"));
}
+ if (servlet == null)
+ {
+ logger.info("Trying with underscore conservative.");
+ className = translateToClassNameAlternative(urlPath);
+ logger.info("className=[" + className + "]");
+ servlet = KissDispatcherUtils.instanciateServlet("website." + className);
+ }
+
if (servlet != null)
{
servlet.init(servletConfig);
@@ -291,4 +299,101 @@ public class KissDispatcherFactory
//
return result;
}
+
+ /**
+ * Translate to class name.
+ *
+ *
+ * "/" => "Index_xhtml"
+ * "/good/" => "good.Index_xhtml"
+ * "/good/morning.xhtml" => "good.MorningXhtml"
+ * "/good/morning_girl.xhtml" => "good.Morning-Girl_xhtml"
+ * "/good/morning-girl.xhtml" => "good.Morning_Girl_xhtml"
+ *
+ *
+ * @param urlPath
+ * the url path
+ * @return the string
+ */
+ public static String translateToClassNameAlternative(final String urlPath)
+ {
+ String result;
+
+ if (urlPath == null)
+ {
+ result = null;
+ }
+ else
+ {
+ if (urlPath.length() == 1)
+ {
+ result = "IndexXhtml";
+ }
+ else if (urlPath.endsWith("/"))
+ {
+ StringBuffer buffer = new StringBuffer(urlPath.length() + 50);
+ for (int index = 1; index < urlPath.length(); index++)
+ {
+ char letter = urlPath.charAt(index);
+
+ if (letter == '/')
+ {
+ buffer.append('.');
+ }
+ else
+ {
+ buffer.append(letter);
+ }
+ }
+ buffer.append(".Index_xhtml");
+
+ result = buffer.toString();
+ }
+ else
+ {
+ int lastToken = urlPath.lastIndexOf('/');
+
+ StringBuffer buffer = new StringBuffer(urlPath.length());
+ for (int index = 1; index <= lastToken; index++)
+ {
+ char letter = urlPath.charAt(index);
+
+ if (letter == '/')
+ {
+ buffer.append('.');
+ }
+ else
+ {
+ buffer.append(letter);
+ }
+ }
+
+ if (lastToken + 1 < urlPath.length())
+ {
+ buffer.append(Character.toUpperCase(urlPath.charAt(lastToken + 1)));
+ }
+
+ for (int index = lastToken + 2; index < urlPath.length(); index++)
+ {
+ char letter = urlPath.charAt(index);
+
+ if (letter == '.')
+ {
+ buffer.append('_');
+ }
+ else
+ {
+ buffer.append(letter);
+ }
+ }
+
+ result = buffer.toString();
+ }
+ }
+
+ logger.info(urlPath + " -> " + result);
+
+ //
+ return result;
+ }
}
diff --git a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
index 8b3b042..0f65414 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -26,18 +26,17 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.Enumeration;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.hooks.ShortURLRewriter;
import fr.devinsy.strings.StringList;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class KissDispatcherUtils.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/WebsiteClasspaths.java b/src/fr/devinsy/kiss4web/dispatcher/WebsiteClasspaths.java
index 226d0aa..92b3805 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/WebsiteClasspaths.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/WebsiteClasspaths.java
@@ -20,13 +20,12 @@ package fr.devinsy.kiss4web.dispatcher;
import java.util.Iterator;
-import javax.servlet.http.HttpServlet;
-
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.strings.StringList;
+import jakarta.servlet.http.HttpServlet;
/**
* The Class WebsiteClasspaths.
@@ -45,8 +44,8 @@ public class WebsiteClasspaths extends StringList
super();
}
- /* (non-Javadoc)
- * @see java.util.ArrayList#add(java.lang.Object)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean add(final String classpath)
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitFailedHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitFailedHook.java
index a2f4bde..4a2ec7b 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitFailedHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitFailedHook.java
@@ -22,16 +22,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class InitHook.
*/
@@ -47,8 +47,8 @@ public class ApplicationInitFailedHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -61,8 +61,8 @@ public class ApplicationInitFailedHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitHook.java
index d186ef8..83cd17c 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/ApplicationInitHook.java
@@ -22,16 +22,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class InitHook.
*/
@@ -47,8 +47,8 @@ public class ApplicationInitHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -61,8 +61,8 @@ public class ApplicationInitHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/BlankHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/BlankHook.java
index b016bfc..ea15a63 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/BlankHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/BlankHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -21,14 +21,14 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
import java.io.PrintWriter;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class BlankHook.
*/
@@ -44,8 +44,8 @@ public class BlankHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -67,8 +67,8 @@ public class BlankHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/ErrorHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/ErrorHook.java
index 962d1c3..78f94b5 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/ErrorHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/ErrorHook.java
@@ -23,16 +23,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class ErrorHook.
*/
@@ -48,8 +48,8 @@ public class ErrorHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +69,8 @@ public class ErrorHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/FatalHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/FatalHook.java
index 7b745ee..bc963f4 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/FatalHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/FatalHook.java
@@ -23,16 +23,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class FatalHook.
*/
@@ -48,8 +48,8 @@ public class FatalHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +69,8 @@ public class FatalHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/FolderHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/FolderHook.java
index e4872da..5443fae 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/FolderHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/FolderHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -20,16 +20,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class FolderHook.
@@ -46,8 +45,8 @@ public class FolderHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class FolderHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/Hook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/Hook.java
index 88db6fd..07213b1 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/Hook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/Hook.java
@@ -20,11 +20,11 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Interface Hook.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/HookCore.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/HookCore.java
index 05febe3..021468e 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/HookCore.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/HookCore.java
@@ -35,8 +35,8 @@ public abstract class HookCore implements Hook
this.terminal = true;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#isTerminal()
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean isTerminal()
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/HookRegister.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/HookRegister.java
index d3ec022..fe75eee 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/HookRegister.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/HookRegister.java
@@ -20,8 +20,8 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.util.Iterator;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpServletRequest;
/**
* The Class HookRegister.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/InitFailedHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/InitFailedHook.java
index 7ada872..199bf73 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/InitFailedHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/InitFailedHook.java
@@ -23,16 +23,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class InitFailedHook.
*/
@@ -48,8 +48,8 @@ public class InitFailedHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +69,8 @@ public class InitFailedHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/InitHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/InitHook.java
index 65cce00..14df916 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/InitHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/InitHook.java
@@ -22,16 +22,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class InitHook.
*/
@@ -47,8 +47,8 @@ public class InitHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -61,8 +61,8 @@ public class InitHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLHook.java
index c6927d9..8ea2b4f 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -20,16 +20,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class LongURLHook.
@@ -46,8 +45,8 @@ public class LongURLHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -62,8 +61,8 @@ public class LongURLHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLRewriter.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLRewriter.java
index 5aebeaf..bbedbcb 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLRewriter.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/LongURLRewriter.java
@@ -21,12 +21,11 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.servlet.http.HttpServletRequest;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.strings.StringList;
+import jakarta.servlet.http.HttpServletRequest;
/**
* The Class LongURLRewriter.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/MaintenanceHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/MaintenanceHook.java
index d70e617..04021bf 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/MaintenanceHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/MaintenanceHook.java
@@ -23,16 +23,16 @@ import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class MaintenanceHook.
*/
@@ -48,8 +48,8 @@ public class MaintenanceHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.kernel.dispatcher.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +69,8 @@ public class MaintenanceHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.dispatcher.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/RootHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/RootHook.java
index 2290fc2..d0bab3f 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/RootHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/RootHook.java
@@ -20,16 +20,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class RootHook.
@@ -46,8 +45,8 @@ public class RootHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class RootHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLHook.java
index f6f415f..1967f72 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLHook.java
@@ -20,16 +20,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class ShortURLHook.
@@ -46,8 +45,8 @@ public class ShortURLHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class ShortURLHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLRewriter.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLRewriter.java
index 7c8b039..5cde6d5 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLRewriter.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/ShortURLRewriter.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -21,12 +21,11 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.servlet.http.HttpServletRequest;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.strings.StringList;
+import jakarta.servlet.http.HttpServletRequest;
/**
* The Class ShortURLRewriter.
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/StatisticsHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/StatisticsHook.java
index df4b8e3..3b6e62e 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/StatisticsHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/StatisticsHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -20,14 +20,14 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* The Class StatisticsHook.
*/
@@ -45,8 +45,8 @@ public class StatisticsHook extends HookCore
setTerminal(false);
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -59,8 +59,8 @@ public class StatisticsHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/WebContentHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/WebContentHook.java
index d3f5f38..ca1f894 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/WebContentHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/WebContentHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -21,16 +21,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.File;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class WebContentHook.
@@ -47,8 +46,8 @@ public class WebContentHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class WebContentHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/WebInfHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/WebInfHook.java
index 52a8ef0..fa4ce84 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/WebInfHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/WebInfHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -21,16 +21,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.File;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class WebInfHook.
@@ -47,8 +46,8 @@ public class WebInfHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class WebInfHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/src/fr/devinsy/kiss4web/dispatcher/hooks/XHTMLHook.java b/src/fr/devinsy/kiss4web/dispatcher/hooks/XHTMLHook.java
index 30187ed..fe51001 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/hooks/XHTMLHook.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/hooks/XHTMLHook.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2006-2021 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -20,16 +20,15 @@ package fr.devinsy.kiss4web.dispatcher.hooks;
import java.io.IOException;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherFactory;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The Class XHTMLHook.
@@ -46,8 +45,8 @@ public class XHTMLHook extends HookCore
super();
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#matches(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
+ /**
+ * {@inheritDoc}
*/
@Override
public boolean matches(final ServletContext servletContext, final HttpServletRequest request)
@@ -69,8 +68,8 @@ public class XHTMLHook extends HookCore
return result;
}
- /* (non-Javadoc)
- * @see fr.devinsy.kiss4web.hooks.Hook#process(javax.servlet.ServletConfig, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /**
+ * {@inheritDoc}
*/
@Override
public void process(final ServletConfig servletConfig, final ServletContext servletContext, final HttpServletRequest request,
diff --git a/test/FooSandbox.java b/test/FooSandbox.java
index 953d3f0..88523bc 100644
--- a/test/FooSandbox.java
+++ b/test/FooSandbox.java
@@ -1,6 +1,6 @@
/**
- * Copyright (C) 2006-2010, 2013-2016 Christian Pierre MOMON
+ * Copyright (C) 2006-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -21,6 +21,7 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.core.config.DefaultConfiguration;
+import org.slf4j.Logger;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
@@ -29,7 +30,7 @@ import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
*/
public class FooSandbox
{
- private static org.apache.logging.log4j.Logger logger;
+ private static Logger logger;
static
{
@@ -38,25 +39,31 @@ public class FooSandbox
Configurator.initialize(new DefaultConfiguration());
Configurator.setRootLevel(Level.INFO);
-
+ logger = LogManager.getLogger(FooSandbox.class.getName());
logger.info("Enter");
//
logger.info("Set the log file format...");
- // log =
- // org.apache.log4j.Category.getInstance(Application.class.getName());
logger.info("... done.");
logger.debug("Exit");
- logger = LogManager.getLogger(FooSandbox.class.getName());
}
/**
+ * Check.
*
+ * @param title
+ * the title
+ * @param source
+ * the source
+ * @param model
+ * the model
+ * @return the string
*/
public static String check(final String title, final StringBuffer source, final String model)
{
+ logger.info("test");
String result;
if (source.indexOf(model) == -1)
@@ -74,7 +81,10 @@ public class FooSandbox
}
/**
+ * The main method.
*
+ * @param args
+ * the arguments
*/
public static void main(final String[] args)
{
@@ -87,7 +97,13 @@ public class FooSandbox
}
/**
- *
+ * Test caller.
+ *
+ * @param pathInfo
+ * the path info
+ * @param prefix
+ * the prefix
+ * @return the string
*/
public static String testCaller(final String pathInfo, final String prefix)
{
diff --git a/test/fr/devinsy/kiss4web/mocks/HttpServletRequestMock.java b/test/fr/devinsy/kiss4web/mocks/HttpServletRequestMock.java
index 879d735..bc1dd61 100644
--- a/test/fr/devinsy/kiss4web/mocks/HttpServletRequestMock.java
+++ b/test/fr/devinsy/kiss4web/mocks/HttpServletRequestMock.java
@@ -1,7 +1,5 @@
-package fr.devinsy.kiss4web.mocks;
-
/**
- * Copyright (C) 2016-2021 Christian Pierre MOMON
+ * Copyright (C) 2016-2023 Christian Pierre MOMON
*
* This file is part of Kiss4web.
*
@@ -18,6 +16,7 @@ package fr.devinsy.kiss4web.mocks;
* You should have received a copy of the GNU Lesser General Public License
* along with Kiss4web. If not, see
*/
+package fr.devinsy.kiss4web.mocks;
import java.io.BufferedReader;
import java.io.IOException;
@@ -28,25 +27,25 @@ import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
-import javax.servlet.AsyncContext;
-import javax.servlet.DispatcherType;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpUpgradeHandler;
-import javax.servlet.http.Part;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.hooks.ShortURLHook;
+import jakarta.servlet.AsyncContext;
+import jakarta.servlet.DispatcherType;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.ServletConnection;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpSession;
+import jakarta.servlet.http.HttpUpgradeHandler;
+import jakarta.servlet.http.Part;
/**
* The Class HttpServletRequestMock.
@@ -294,6 +293,13 @@ public class HttpServletRequestMock implements HttpServletRequest
return null;
}
+ @Override
+ public String getProtocolRequestId()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
@Override
public String getQueryString()
{
@@ -308,13 +314,6 @@ public class HttpServletRequestMock implements HttpServletRequest
return null;
}
- @Override
- public String getRealPath(final String path)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
@Override
public String getRemoteAddr()
{
@@ -357,6 +356,13 @@ public class HttpServletRequestMock implements HttpServletRequest
return null;
}
+ @Override
+ public String getRequestId()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
@Override
public String getRequestURI()
{
@@ -392,6 +398,13 @@ public class HttpServletRequestMock implements HttpServletRequest
return 0;
}
+ @Override
+ public ServletConnection getServletConnection()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
@Override
public ServletContext getServletContext()
{
@@ -448,13 +461,6 @@ public class HttpServletRequestMock implements HttpServletRequest
return false;
}
- @Override
- public boolean isRequestedSessionIdFromUrl()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
@Override
public boolean isRequestedSessionIdFromURL()
{