Skip to content

Commit

Permalink
Merge pull request #1075 from apache/feature/WW-5471-deprecate-sitemesh
Browse files Browse the repository at this point in the history
WW-5471 Marks Sitemesh plugin as deprecated
  • Loading branch information
lukaszlenart authored Oct 15, 2024
2 parents 78451db + 49ddf61 commit 9f2770b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/sitemesh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
* <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);
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
* <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);
Expand All @@ -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) {
Expand Down

0 comments on commit 9f2770b

Please sign in to comment.