mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
Merge pull request #1075 from apache/feature/WW-5471-deprecate-sitemesh
WW-5471 Marks Sitemesh plugin as deprecated
This commit is contained in:
@@ -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>
|
||||
|
||||
+4
@@ -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) {
|
||||
|
||||
+4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user