This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch feature/WW-5471-deprecate-sitemesh
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 49ddf6130a4cc28bddee84c2d56887c138991713
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Mon Oct 14 07:50:00 2024 +0200

    WW-5471 Marks Sitemesh plugin as deprecated
---
 plugins/sitemesh/pom.xml                                              | 2 +-
 .../java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java  | 4 ++++
 .../java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java    | 4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/plugins/sitemesh/pom.xml b/plugins/sitemesh/pom.xml
index 0c3d1a35a..11db635f4 100644
--- a/plugins/sitemesh/pom.xml
+++ b/plugins/sitemesh/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>struts2-sitemesh-plugin</artifactId>
     <packaging>jar</packaging>
-    <name>Struts 2 Sitemesh Plugin</name>
+    <name>DEPRECATED: Struts 2 Sitemesh Plugin</name>
 
     <dependencies>
         <dependency>
diff --git 
a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
 
b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
index b6bd1ac74..a63b7c0fa 100644
--- 
a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
+++ 
b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
@@ -53,7 +53,10 @@ import java.util.Locale;
  * <p>It overrides the SiteMesh servlet to rely on the
  * Freemarker Manager in Struts instead of creating it's
  * own manager</p>
+ *
+ * @deprecated Sitemesh 2 based plugin is not supported anymore
  */
+@Deprecated
 public class FreemarkerDecoratorServlet extends 
freemarker.ext.servlet.FreemarkerServlet {
 
     private static final Logger LOG = 
LogManager.getLogger(FreemarkerDecoratorServlet.class);
@@ -69,6 +72,7 @@ public class FreemarkerDecoratorServlet extends 
freemarker.ext.servlet.Freemarke
     private boolean noCharsetInContentType;
 
     public void init() throws ServletException {
+        LOG.warn("This plugin is deprecated. Please migrate to a plugin which 
bases on Sitemesh 3!");
         try {
             Dispatcher dispatcher = 
Dispatcher.getInstance(getServletContext());
             if (dispatcher == null) {
diff --git 
a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
 
b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
index b2079c2f2..32f202913 100644
--- 
a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
+++ 
b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
@@ -53,7 +53,10 @@ import java.io.StringWriter;
  * <p>It overrides the SiteMesh servlet to rely on the
  * Velocity Manager in Struts instead of creating it's
  * own manager</p>
+ *
+ * @deprecated Sitemesh 2 based plugin is not supported anymore
  */
+@Deprecated
 public class VelocityDecoratorServlet extends VelocityViewServlet {
 
     private static final Logger LOG = 
LogManager.getLogger(VelocityDecoratorServlet.class);
@@ -76,6 +79,7 @@ public class VelocityDecoratorServlet extends 
VelocityViewServlet {
      * @param config servlet configuration
      */
     public void init(ServletConfig config) throws ServletException {
+        LOG.warn("This plugin is deprecated. Please migrate to a plugin which 
bases on Sitemesh 3!");
         super.init(config);
         Dispatcher dispatcher = Dispatcher.getInstance(getServletContext());
         if (dispatcher == null) {

Reply via email to