Merge pull request #1075 from apache/feature/WW-5471-deprecate-sitemesh

WW-5471 Marks Sitemesh plugin as deprecated
This commit is contained in:
Lukasz Lenart
2024-10-15 16:16:44 +02:00
committed by GitHub
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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>
@@ -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) {
@@ -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) {