diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 799d9b2588..802ca84216 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -48,11 +48,6 @@ struts2-config-browser-plugin - - org.apache.struts - struts2-sitemesh-plugin - - org.apache.struts struts2-tiles-plugin @@ -126,9 +121,9 @@ - org.apache.struts - struts2-sitemesh2-jakarta - ${project.version} + org.sitemesh + sitemesh + 3.2.1 @@ -156,6 +151,17 @@ ${hibernate-validator.version} + + + org.codehaus.groovy + groovy-jsr223 + 3.0.22 + @@ -174,11 +180,6 @@ ${project.build.directory}/extraclasspath - - org.apache.struts - struts2-sitemesh2-jakarta - struts2-sitemesh2-jakarta.jar - org.apache.struts struts2-velocity-tools-view-jakarta @@ -244,7 +245,6 @@ ${basedir}/src/main/webapp/ - ${project.build.directory}/extraclasspath/struts2-sitemesh2-jakarta.jar, ${project.build.directory}/extraclasspath/struts2-velocity-tools-view-jakarta.jar, ${project.build.directory}/extraclasspath/struts2-velocity-tools-jsp-jakarta diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp index 9003e52ed2..9693e037af 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp @@ -49,8 +49,6 @@ sourceUrl += "?page=" + request.getServletPath(); } %> -<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> -<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %> <%@taglib prefix="s" uri="/struts-tags" %> @@ -61,7 +59,7 @@ - <decorator:title default="Struts2 Showcase"/> + <sitemesh:write property="title"/> @@ -94,7 +92,7 @@ jQuery(document).ready(function() { prettyPrint(); } ); - + @@ -286,8 +284,7 @@ - - +
diff --git a/apps/showcase/src/main/webapp/WEB-INF/sitemesh-decorator.tld b/apps/showcase/src/main/webapp/WEB-INF/sitemesh-decorator.tld deleted file mode 100644 index 399ac22f02..0000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/sitemesh-decorator.tld +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - 1.0 - 1.1 - SiteMesh Decorator Tags - sitemesh-decorator - - - head - com.opensymphony.module.sitemesh.taglib.decorator.HeadTag - JSP - - - - body - com.opensymphony.module.sitemesh.taglib.decorator.BodyTag - JSP - - - - title - com.opensymphony.module.sitemesh.taglib.decorator.TitleTag - JSP - - default - false - true - - - - - getProperty - com.opensymphony.module.sitemesh.taglib.decorator.PropertyTag - JSP - - property - true - true - - - default - false - true - - - writeEntireProperty - false - true - - - - - usePage - com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag - com.opensymphony.module.sitemesh.taglib.decorator.UsePageTEI - JSP - - id - true - false - - - - - useHtmlPage - com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag - com.opensymphony.module.sitemesh.taglib.decorator.UseHTMLPageTEI - JSP - - id - true - false - - - - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/sitemesh-page.tld b/apps/showcase/src/main/webapp/WEB-INF/sitemesh-page.tld deleted file mode 100644 index 1dcb0352df..0000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/sitemesh-page.tld +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - 1.0 - 1.1 - SiteMesh Page Tags - sitemesh-page - - - applyDecorator - com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag - JSP - - name - false - true - - - page - false - true - - - title - false - true - - - id - false - true - - - contentType - false - true - - - encoding - false - true - - - - - - apply-decorator - com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag - JSP - - name - false - true - - - page - false - true - - - title - false - true - - - id - false - true - - - contentType - false - true - - - encoding - false - true - - - - - param - com.opensymphony.module.sitemesh.taglib.page.ParamTag - JSP - - name - false - true - - - - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/sitemesh.xml b/apps/showcase/src/main/webapp/WEB-INF/sitemesh.xml deleted file mode 100644 index 101d3145bf..0000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/sitemesh.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators.xml b/apps/showcase/src/main/webapp/WEB-INF/sitemesh3.xml similarity index 63% rename from apps/showcase/src/main/webapp/WEB-INF/decorators.xml rename to apps/showcase/src/main/webapp/WEB-INF/sitemesh3.xml index 5ec6b1487c..88cd74843d 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators.xml +++ b/apps/showcase/src/main/webapp/WEB-INF/sitemesh3.xml @@ -19,18 +19,12 @@ * under the License. */ --> - - - - /debug.jsp - /styles/* - /scripts/* - /images/* - /struts/* - /nodecorate/* - - - - /* - - + + + + + + + + + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/web.xml b/apps/showcase/src/main/webapp/WEB-INF/web.xml index dcc1889448..490e8b3e67 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/web.xml +++ b/apps/showcase/src/main/webapp/WEB-INF/web.xml @@ -46,8 +46,8 @@ - sitemesh - com.opensymphony.sitemesh.webapp.SiteMeshFilter + sitemesh3 + org.sitemesh.config.ConfigurableSiteMeshFilter true @@ -64,7 +64,7 @@ - sitemesh + sitemesh3 /* FORWARD REQUEST @@ -112,6 +112,8 @@ + testServlet org.apache.struts2.showcase.servlet.TestServlet + strutsServlet diff --git a/assembly/pom.xml b/assembly/pom.xml index 57e20e4e95..ba9cde474e 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -186,14 +186,11 @@ struts2-rest-plugin - - org.apache.struts - struts2-sitemesh-plugin - org.apache.struts struts2-spring-plugin + org.apache.struts struts2-testng-plugin diff --git a/assembly/src/main/assembly/all.xml b/assembly/src/main/assembly/all.xml index 5642d0b0ee..4bb1d142b1 100644 --- a/assembly/src/main/assembly/all.xml +++ b/assembly/src/main/assembly/all.xml @@ -64,13 +64,6 @@ XPP3-LICENSE.txt - - ../plugins/sitemesh/src/main/resources - - - SITEMESH-LICENSE.txt - - target/apps apps @@ -146,10 +139,6 @@ ../plugins/rest/target/apidocs docs/struts2-plugins/struts2-rest-plugin/apidocs - - ../plugins/sitemesh/target/apidocs - docs/struts2-plugins/struts2-sitemesh-plugin/apidocs - ../plugins/spring/target/apidocs docs/struts2-plugins/struts2-spring-plugin/apidocs diff --git a/assembly/src/main/assembly/apps.xml b/assembly/src/main/assembly/apps.xml index 2ef3e44a50..43ade2f482 100644 --- a/assembly/src/main/assembly/apps.xml +++ b/assembly/src/main/assembly/apps.xml @@ -60,12 +60,5 @@ XPP3-LICENSE.txt - - ../plugins/sitemesh/src/main/resources - - - SITEMESH-LICENSE.txt - - diff --git a/assembly/src/main/assembly/docs.xml b/assembly/src/main/assembly/docs.xml index 922167d764..ca9beba368 100644 --- a/assembly/src/main/assembly/docs.xml +++ b/assembly/src/main/assembly/docs.xml @@ -90,10 +90,6 @@ ../plugins/rest/target/apidocs docs/struts2-plugins/struts2-rest-plugin/apidocs - - ../plugins/sitemesh/target/apidocs - docs/struts2-plugins/struts2-sitemesh-plugin/apidocs - ../plugins/spring/target/apidocs docs/struts2-plugins/struts2-spring-plugin/apidocs diff --git a/assembly/src/main/assembly/lib.xml b/assembly/src/main/assembly/lib.xml index f9d76f3922..073866ade9 100644 --- a/assembly/src/main/assembly/lib.xml +++ b/assembly/src/main/assembly/lib.xml @@ -64,12 +64,5 @@ XPP3-LICENSE.txt - - ../plugins/sitemesh/src/main/resources - - - SITEMESH-LICENSE.txt - - diff --git a/bom/pom.xml b/bom/pom.xml index 0f9e165a61..900eb1e7e3 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -131,11 +131,6 @@ struts2-rest-plugin ${struts-version.version} - - org.apache.struts - struts2-sitemesh-plugin - ${struts-version.version} - org.apache.struts struts2-spring-plugin diff --git a/jakarta/pom.xml b/jakarta/pom.xml index a1186f0241..c48f0a61bc 100644 --- a/jakarta/pom.xml +++ b/jakarta/pom.xml @@ -37,7 +37,6 @@ - sitemesh2-jakarta velocity-tools-view-jakarta velocity-tools-jsp-jakarta diff --git a/jakarta/sitemesh2-jakarta/README.md b/jakarta/sitemesh2-jakarta/README.md deleted file mode 100644 index f8382b49bf..0000000000 --- a/jakarta/sitemesh2-jakarta/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Struts 2 Sitemesh2 Jakarta - -This uses the eclipse transformer maven plugin to make the Sitemesh2 dependency Jakarta EE 9+ compatible. - diff --git a/jakarta/sitemesh2-jakarta/pom.xml b/jakarta/sitemesh2-jakarta/pom.xml deleted file mode 100644 index 1cd99aa13e..0000000000 --- a/jakarta/sitemesh2-jakarta/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - 4.0.0 - - org.apache.struts - struts2-jakarta - 7.0.0-M10-SNAPSHOT - - struts2-sitemesh2-jakarta - jar - Struts 2 Jakarta EE Compatible Sitemesh2 - - - UTF-8 - true - true - - - - - - org.eclipse.transformer - transformer-maven-plugin - 0.5.0 - true - - - true - - - - - eclipse-transformer-freemarker-jar - - jar - - - - opensymphony - sitemesh - ${sitemesh.version} - - - - - - - - diff --git a/plugins/pom.xml b/plugins/pom.xml index c762c4c2a9..2a9dac6774 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -43,7 +43,6 @@ json junit rest - sitemesh spring testng tiles diff --git a/plugins/sitemesh/README.md b/plugins/sitemesh/README.md deleted file mode 100644 index b11ca91e9b..0000000000 --- a/plugins/sitemesh/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Struts 2 Sitemesh plugin -This plugin is deprecated, and it will be removed soon, **please do not use it**! diff --git a/plugins/sitemesh/pom.xml b/plugins/sitemesh/pom.xml deleted file mode 100644 index 4ab5e0702e..0000000000 --- a/plugins/sitemesh/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - 4.0.0 - - org.apache.struts - struts2-plugins - 7.0.0-M10-SNAPSHOT - - - struts2-sitemesh-plugin - jar - Struts 2 Sitemesh Plugin - - - - org.apache.struts - struts2-sitemesh2-jakarta - ${project.version} - - - - - org.apache.struts - struts2-velocity-plugin - true - - - org.apache.struts - struts2-velocity-tools-view-jakarta - true - - - org.apache.struts - struts2-velocity-tools-jsp-jakarta - true - - - - - UTF-8 - - 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 deleted file mode 100644 index 7672868198..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.HTMLPage; -import com.opensymphony.module.sitemesh.RequestConstants; -import com.opensymphony.xwork2.ActionContext; -import freemarker.core.InvalidReferenceException; -import freemarker.ext.jakarta.servlet.FreemarkerServlet; -import freemarker.template.Configuration; -import freemarker.template.ObjectWrapper; -import freemarker.template.SimpleHash; -import freemarker.template.Template; -import freemarker.template.TemplateException; -import freemarker.template.TemplateModel; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.StrutsException; -import org.apache.struts2.dispatcher.Dispatcher; -import org.apache.struts2.dispatcher.listener.StrutsListener; -import org.apache.struts2.views.freemarker.FreemarkerManager; -import org.apache.struts2.views.freemarker.ScopesHashModel; - -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.StringWriter; -import java.util.Enumeration; -import java.util.Locale; - -/** - *

This is a SiteMesh FreeMarker view servlet.

- * - *

It overrides the SiteMesh servlet to rely on the - * Freemarker Manager in Struts instead of creating it's - * own manager

- */ -public class FreemarkerDecoratorServlet extends FreemarkerServlet { - - private static final Logger LOG = LogManager.getLogger(FreemarkerDecoratorServlet.class); - - protected FreemarkerManager freemarkerManager; - protected String templatePath; - protected boolean nocache; - protected boolean debug; - protected Configuration config; - private ObjectWrapper wrapper; - private String contentType; - private boolean noCharsetInContentType; - - public void init() throws ServletException { - try { - Dispatcher dispatcher = Dispatcher.getInstance(getServletContext()); - if (dispatcher == null) { - throw new IllegalStateException("Unable to find the Dispatcher in the Servlet Context. Is '" + StrutsListener.class.getName() + "' missing in web.xml?"); - } - freemarkerManager = dispatcher.getContainer().getInstance(FreemarkerManager.class); - config = createConfiguration(); - - // Process object_wrapper init-param out of order: - wrapper = config.getObjectWrapper(); - LOG.debug("Using object wrapper of class {}", wrapper.getClass().getName()); - - // Process all other init-params: - Enumeration initpnames = getServletConfig().getInitParameterNames(); - while (initpnames.hasMoreElements()) { - String name = (String) initpnames.nextElement(); - String value = getInitParameter(name); - if (name == null) { - throw new ServletException("init-param without param-name. Maybe the web.xml is not well-formed?"); - } - if (value == null) { - throw new ServletException("init-param without param-value. Maybe the web.xml is not well-formed?"); - } - - // template path is already handled! - if (!FreemarkerManager.INITPARAM_TEMPLATE_PATH.equals(name)) freemarkerManager.addSetting(name, value); - } - nocache = freemarkerManager.getNocache(); - debug = freemarkerManager.getDebug(); - contentType = freemarkerManager.getContentType(); - noCharsetInContentType = freemarkerManager.getNoCharsetInContentType(); - } catch (ServletException e) { - throw e; - } catch (Exception e) { - throw new ServletException(e); - } - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - process(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - process(request, response); - } - - private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - // Give chance to subclasses to perform preprocessing - if (preprocessRequest(request, response)) { - return; - } - - String path = requestUrlToTemplatePath(request); - - if (debug) { - log("Requested template: " + path); - } - - Template template; - try { - template = config.getTemplate(path, deduceLocale(path, request, response)); - } catch (FileNotFoundException e) { - response.sendError(HttpServletResponse.SC_NOT_FOUND); - return; - } - - Object attrContentType = template.getCustomAttribute("content_type"); - if (attrContentType != null) { - response.setContentType(attrContentType.toString()); - } else { - if (noCharsetInContentType) { - response.setContentType(contentType + "; charset=" + template.getEncoding()); - } else { - response.setContentType(contentType); - } - } - - // Set cache policy - setBrowserCachingPolicy(response); - - ServletContext servletContext = getServletContext(); - ScopesHashModel model = (ScopesHashModel) request.getAttribute(FreemarkerManager.ATTR_TEMPLATE_MODEL); - try { - if (model == null) { - ActionContext ctx = ServletActionContext.getActionContext(request); - if (ctx == null) { - throw new StrutsException("ActionContext is null! Freemarker accessed out of action?"); - } - model = freemarkerManager.buildTemplateModel(ctx.getValueStack(), ctx.getActionInvocation().getAction(), servletContext, request, response, wrapper); - } - - // Give subclasses a chance to hook into preprocessing - if (preTemplateProcess(request, response, template, model)) { - try { - // Process the template - template.process(model, response.getWriter()); - } finally { - // Give subclasses a chance to hook into postprocessing - postTemplateProcess(request, response, template, model); - } - } - } catch (InvalidReferenceException x) { - // this exception is thrown if there is an error processing a reference. We want to report these! - HttpServletRequest req = ActionContext.getContext().getServletRequest(); - String resultCode = ActionContext.getContext().getActionInvocation().getResultCode(); - if (req == null) { - req = request; - } - - StringBuilder msgBuf = new StringBuilder("Error applying freemarker template to\n request: "); - msgBuf.append(req.getRequestURL()); - if (req.getQueryString() != null) { - msgBuf.append("?").append(req.getQueryString()); - } - msgBuf.append(" with resultCode: ").append(resultCode).append(".\n\n").append(x.getMessage()); - String msg = msgBuf.toString(); - LOG.error(msg, x); - - ServletException e = new ServletException(msg, x); - // Attempt to set init cause, but don't freak out if the method - // is not available (i.e. pre-1.4 JRE). This is required as the - // constructor-passed throwable won't show up automatically in - // stack traces. - try { - e.getClass().getMethod("initCause", new Class[]{Throwable.class}).invoke(e, x); - } catch (Exception ex) { - // Can't set init cause, we're probably running on a pre-1.4 - // JDK, oh well... - } - throw e; - } catch (TemplateException te) { - if (config.getTemplateExceptionHandler().getClass().getName().contains("Debug")) { - this.log("Error executing FreeMarker template", te); - } else { - ServletException e = new ServletException("Error executing FreeMarker template", te); - // Attempt to set init cause, but don't freak out if the method - // is not available (i.e. pre-1.4 JRE). This is required as the - // constructor-passed throwable won't show up automatically in - // stack traces. - try { - e.getClass().getMethod("initCause", new Class[]{Throwable.class}).invoke(e, te); - } catch (Exception ex) { - // Can't set init cause, we're probably running on a pre-1.4 - // JDK, oh well... - } - throw e; - } - } - } - - - /** - * Returns the locale used for the - * {@link Configuration#getTemplate(String, Locale)} call. - * The base implementation simply returns the locale setting of the - * configuration. Override this method to provide different behaviour, i.e. - * to use the locale indicated in the request. - */ - protected Locale deduceLocale(String templatePath, HttpServletRequest request, HttpServletResponse response) { - return config.getLocale(); - } - - - /** - *

- * Create the instance of the freemarker Configuration object. - *

- * - *

- * this implementation - *

- * - *
    - *
  • obtains the default configuration from Configuration.getDefaultConfiguration() - *
  • sets up template loading from a ClassTemplateLoader and a WebappTemplateLoader - *
  • sets up the object wrapper to be the BeansWrapper - *
  • loads settings from the classpath file /freemarker.properties - *
- */ - protected freemarker.template.Configuration createConfiguration() { - return freemarkerManager.getConfiguration(this.getServletContext()); - } - - /** - *

- * Called before the execution is passed to template.process(). - * This is a generic hook you might use in subclasses to perform a specific - * action before the template is processed. By default does nothing. - * A typical action to perform here is to inject application-specific - * objects into the model root - *

- * - *

Example: Expose the Serlvet context path as "baseDir" for all templates: - *

- * - *
-     *    ((SimpleHash) data).put("baseDir", request.getContextPath() + "/");
-     *    return true;
-     * 
- * - * @param request the actual HTTP request - * @param response the actual HTTP response - * @param template the template that will get executed - * @return true to process the template, false to suppress template processing. - * @see FreemarkerServlet#preTemplateProcess(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, freemarker.template.Template, freemarker.template.TemplateModel) - */ - protected boolean preTemplateProcess(HttpServletRequest request, HttpServletResponse response, Template template, TemplateModel templateModel) throws ServletException, IOException { - boolean result = super.preTemplateProcess(request, response, template, templateModel); - - SimpleHash hash = (SimpleHash) templateModel; - - HTMLPage htmlPage = (HTMLPage) request.getAttribute(RequestConstants.PAGE); - - String title, body, head; - - if (htmlPage == null) { - title = "No Title"; - body = "No Body"; - head = ""; - } else { - title = htmlPage.getTitle(); - - StringWriter buffer = new StringWriter(); - htmlPage.writeBody(buffer); - body = buffer.toString(); - - buffer = new StringWriter(); - htmlPage.writeHead(buffer); - head = buffer.toString(); - - hash.put("page", htmlPage); - } - - hash.put("title", title); - hash.put("body", body); - hash.put("head", head); - hash.put("base", request.getContextPath()); - - /* - Factory factory = Factory.getInstance(new Config(getServletConfig())); - Decorator decorator = factory.getDecoratorMapper().getDecorator(request, htmlPage); - -> decorator.getPage() - */ - - return result; - } - - /** - * If the parameter "nocache" was set to true, generate a set of headers - * that will advise the HTTP client not to cache the returned page. - */ - private void setBrowserCachingPolicy(HttpServletResponse res) { - if (nocache) { - // HTTP/1.1 + IE extensions - res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, " + "post-check=0, pre-check=0"); - // HTTP/1.0 - res.setHeader("Pragma", "no-cache"); - // Last resort for those that ignore all of the above - res.setHeader("Expires", FreemarkerManager.EXPIRATION_DATE); - } - } -} diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerMapper2DecoratorSelector.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerMapper2DecoratorSelector.java deleted file mode 100644 index ccad3c4e81..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerMapper2DecoratorSelector.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.DecoratorMapper; -import com.opensymphony.sitemesh.DecoratorSelector; -import com.opensymphony.sitemesh.Content; -import com.opensymphony.sitemesh.SiteMeshContext; -import com.opensymphony.sitemesh.compatability.Content2HTMLPage; -import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext; -import com.opensymphony.sitemesh.webapp.decorator.NoDecorator; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * Returns a {@link OldDecorator2NewStrutsFreemarkerDecorator} decorator - * for a Freemarker request. - * - * Won't decorate the output if it finds a "decorator" flag in the request - */ -public class FreemarkerMapper2DecoratorSelector implements DecoratorSelector { - - private final DecoratorMapper decoratorMapper; - - public FreemarkerMapper2DecoratorSelector(DecoratorMapper decoratorMapper) { - this.decoratorMapper = decoratorMapper; - } - - public com.opensymphony.sitemesh.Decorator selectDecorator(Content content, SiteMeshContext context) { - SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context; - HttpServletRequest request = webAppContext.getRequest(); - com.opensymphony.module.sitemesh.Decorator decorator = - decoratorMapper.getDecorator(request, new Content2HTMLPage(content, request)); - if (decorator == null || decorator.getPage() == null) { - return new NoDecorator(); - } else { - return new OldDecorator2NewStrutsFreemarkerDecorator(decorator); - } - } -} diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerPageFilter.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerPageFilter.java deleted file mode 100644 index d938aab10b..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerPageFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.Config; -import com.opensymphony.module.sitemesh.Factory; -import com.opensymphony.sitemesh.DecoratorSelector; -import com.opensymphony.sitemesh.webapp.SiteMeshFilter; -import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext; -import com.opensymphony.xwork2.inject.Inject; -import org.apache.struts2.views.freemarker.FreemarkerManager; - -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletContext; - -/** - * Core Filter for integrating SiteMesh + Freemarker into - * a Java web application. - */ -public class FreemarkerPageFilter extends SiteMeshFilter { - - /* - * @see com.opensymphony.module.sitemesh.Factory.SITEMESH_FACTORY - */ - private static final String SITEMESH_FACTORY = "sitemesh.factory"; - - @Inject(required = false) - public static void setFreemarkerManager(FreemarkerManager mgr) { - OldDecorator2NewStrutsFreemarkerDecorator.setFreemarkerManager(mgr); - } - - private FilterConfig filterConfig; - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - super.init(filterConfig); - ServletContext sc = filterConfig.getServletContext(); - Factory instance = (Factory) sc.getAttribute(SITEMESH_FACTORY); - if (instance == null) { - sc.setAttribute(SITEMESH_FACTORY, new StrutsSiteMeshFactory(new Config(filterConfig))); - } - } - - protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) { - Factory factory = Factory.getInstance(new Config(filterConfig)); - factory.refresh(); - return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper()); - } -} diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/NoneDecoratorMapper.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/NoneDecoratorMapper.java deleted file mode 100644 index 515cf30a2d..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/NoneDecoratorMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper; -import com.opensymphony.module.sitemesh.Decorator; -import com.opensymphony.module.sitemesh.Page; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * Won't decorate the output if it finds a "decorator" flag in the request - */ -public class NoneDecoratorMapper extends AbstractDecoratorMapper { - - public Decorator getDecorator(HttpServletRequest req, Page page) { - if ("none".equals(req.getAttribute("decorator"))) { - return null; - } - - return super.getDecorator(req, page); - } -} \ No newline at end of file diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsDecorator.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsDecorator.java deleted file mode 100644 index 37b033aa88..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsDecorator.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.RequestConstants; -import com.opensymphony.sitemesh.Content; -import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext; -import com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionEventListener; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.ActionProxy; -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.LocaleProvider; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.interceptor.PreResultListener; -import com.opensymphony.xwork2.util.ValueStack; -import freemarker.template.Configuration; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.dispatcher.Dispatcher; - -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Locale; - -/** - * Adapts a SiteMesh 2 {@link com.opensymphony.module.sitemesh.Decorator} to a - * SiteMesh 3 {@link com.opensymphony.sitemesh.Decorator}. - * - * @since SiteMesh 3 - */ -public abstract class OldDecorator2NewStrutsDecorator extends BaseWebAppDecorator implements RequestConstants { - - protected com.opensymphony.module.sitemesh.Decorator oldDecorator; - private static String customEncoding; - - public OldDecorator2NewStrutsDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator) { - this.oldDecorator = oldDecorator; - } - - public OldDecorator2NewStrutsDecorator() { - oldDecorator = null; - } - - - /** - * Applies the decorator, using the relevent contexts - * - * @param content The content - * @param request The servlet request - * @param response The servlet response - * @param servletContext The servlet context - * @param ctx The action context for this request, populated with the server state - */ - protected abstract void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, ActionContext ctx) throws ServletException, IOException; - - /** - * Applies the decorator, creating the relevent contexts and delegating to - * the extended applyDecorator(). - * - * @param content The content - * @param request The servlet request - * @param response The servlet response - * @param servletContext The servlet context - * @param webAppContext The web app context - */ - - protected void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, SiteMeshWebAppContext webAppContext) throws IOException, ServletException { - - // see if the URI path (webapp) is set - if (oldDecorator.getURIPath() != null) { - // in a security conscious environment, the servlet container - // may return null for a given URL - if (servletContext.getContext(oldDecorator.getURIPath()) != null) { - servletContext = servletContext.getContext(oldDecorator.getURIPath()); - } - } - - ActionContext ctx = ServletActionContext.getActionContext(request); - if (ctx == null) { - // ok, one isn't associated with the request, so let's create one using the current Dispatcher - ValueStack vs = Dispatcher.getInstance().getValueStackFactory().createValueStack(); - vs.getContext().putAll(Dispatcher.getInstance().createContextMap(request, response, null)); - ctx = ActionContext.of(vs.getContext()); - if (ctx.getActionInvocation() == null) { - // put in a dummy ActionSupport so basic functionality still works - ActionSupport action = new ActionSupport(); - vs.push(action); - ctx.withActionInvocation(new DummyActionInvocation(action)); - } - } - - // delegate to the actual page decorator - render(content, request, response, servletContext, ctx); - - } - - /** - * Returns the locale used for the {@link freemarker.template.Configuration#getTemplate(String, java.util.Locale)} call. The base implementation - * simply returns the locale setting of the action (assuming the action implements {@link LocaleProvider}) or, if - * the action does not the configuration's locale is returned. Override this method to provide different behaviour, - */ - protected Locale getLocale(ActionInvocation invocation, Configuration configuration) { - if (invocation.getAction() instanceof LocaleProvider) { - return ((LocaleProvider) invocation.getAction()).getLocale(); - } else { - return configuration.getLocale(); - } - } - - - /** - * Gets the L18N encoding of the system. The default is UTF-8. - */ - protected String getEncoding() { - String encoding = customEncoding; - if (encoding == null) { - encoding = System.getProperty("file.encoding"); - } - if (encoding == null) { - encoding = "UTF-8"; - } - return encoding; - } - - - static class DummyActionInvocation implements ActionInvocation { - - ActionSupport action; - - public DummyActionInvocation(ActionSupport action) { - this.action = action; - } - - public Object getAction() { - return action; - } - - public boolean isExecuted() { - return false; - } - - public ActionContext getInvocationContext() { - return null; - } - - public ActionProxy getProxy() { - return null; - } - - public Result getResult() throws Exception { - return null; - } - - public String getResultCode() { - return null; - } - - public void setResultCode(String resultCode) { - } - - public ValueStack getStack() { - return null; - } - - public void addPreResultListener(PreResultListener listener) { - } - - public String invoke() throws Exception { - return null; - } - - public String invokeActionOnly() throws Exception { - return null; - } - - public void setActionEventListener(ActionEventListener listener) { - } - - public void init(ActionProxy proxy) { - } - - } - -} diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java deleted file mode 100644 index 6e68e1e548..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsFreemarkerDecorator.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.HTMLPage; -import com.opensymphony.sitemesh.Content; -import com.opensymphony.sitemesh.compatability.Content2HTMLPage; -import com.opensymphony.xwork2.ActionContext; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; -import freemarker.template.Configuration; -import freemarker.template.SimpleHash; -import freemarker.template.Template; -import org.apache.struts2.views.freemarker.FreemarkerManager; -import org.apache.struts2.views.freemarker.ScopesHashModel; - -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * Adapts a SiteMesh 2 Freemarker {@link com.opensymphony.module.sitemesh.Decorator} to a - * SiteMesh 3 {@link com.opensymphony.sitemesh.Decorator}. - * Extends OldDecorator2NewStrutsDecorator to add Struts functionality for Freemarker - * @since SiteMesh 2 - */ -public class OldDecorator2NewStrutsFreemarkerDecorator extends OldDecorator2NewStrutsDecorator { - private static final Logger LOG = LogManager.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class); - - private static FreemarkerManager freemarkerManager; - - public static void setFreemarkerManager(FreemarkerManager mgr) { - freemarkerManager = mgr; - } - - public OldDecorator2NewStrutsFreemarkerDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator) { - this.oldDecorator = oldDecorator; - } - - /** - * Applies the decorator, using the relevent contexts - * - * @param content The content - * @param request The servlet request - * @param response The servlet response - * @param servletContext The servlet context - * @param ctx The action context for this request, populated with the server state - */ - protected void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, ActionContext ctx) throws ServletException, IOException { - if (freemarkerManager == null) { - throw new ServletException("Missing freemarker dependency"); - } - - try { - // get the configuration and template - Configuration config = freemarkerManager.getConfiguration(servletContext); - Template template = config.getTemplate(oldDecorator.getPage(), getLocale(ctx.getActionInvocation(), config)); // WW-1181 - - // get the main hash - ScopesHashModel model = (ScopesHashModel) request.getAttribute(freemarkerManager.ATTR_TEMPLATE_MODEL); - if (model == null) { - model = freemarkerManager.buildTemplateModel(ctx.getValueStack(), ctx.getActionInvocation().getAction(), servletContext, request, response, config.getObjectWrapper()); - } - - // populate the hash with the page - HTMLPage htmlPage = new Content2HTMLPage(content, request); - model.put("page", htmlPage); - model.put("head", htmlPage.getHead()); - model.put("title", htmlPage.getTitle()); - model.put("body", htmlPage.getBody()); - model.put("page.properties", new SimpleHash(htmlPage.getProperties())); - - // finally, render it - template.process(model, response.getWriter()); - } catch (Exception e) { - String msg = "Error applying decorator to request: " + request.getRequestURL() + "?" + request.getQueryString() + " with message:" + e.getMessage(); - LOG.error(msg, e); - throw new ServletException(msg, e); - } - } - -} - diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java deleted file mode 100644 index edc2737a49..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsVelocityDecorator.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.HTMLPage; -import com.opensymphony.sitemesh.Content; -import com.opensymphony.sitemesh.compatability.Content2HTMLPage; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.inject.Inject; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.views.velocity.VelocityManager; -import org.apache.velocity.context.Context; - -import java.io.IOException; -import java.io.PrintWriter; - -/** - * Extends OldDecorator2NewStrutsDecorator to add Struts functionality for Velocity - */ -public class OldDecorator2NewStrutsVelocityDecorator extends OldDecorator2NewStrutsDecorator { - private static final Logger LOG = LogManager.getLogger(OldDecorator2NewStrutsFreemarkerDecorator.class); - - private static VelocityManager velocityManager; - - @Inject(required = false) - public static void setVelocityManager(VelocityManager mgr) { - velocityManager = mgr; - } - - public OldDecorator2NewStrutsVelocityDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator) { - this.oldDecorator = oldDecorator; - } - - /** - * Applies the decorator, using the relevent contexts - * - * @param content The content - * @param request The servlet request - * @param response The servlet response - * @param servletContext The servlet context - * @param ctx The action context for this request, populated with the server state - */ - protected void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, ActionContext ctx) throws ServletException, IOException { - if (velocityManager == null) { - throw new ServletException("Missing freemarker dependency"); - } - - try { - - // init (if needed) - velocityManager.init(servletContext); - - // get encoding - String encoding = getEncoding(); - - HTMLPage htmlPage = new Content2HTMLPage(content, request); - - // get the template and context - org.apache.velocity.Template template = velocityManager.getVelocityEngine().getTemplate(oldDecorator.getPage(), encoding); - Context context = velocityManager.createContext(ctx.getValueStack(), request, response); - - // put the page in the context - context.put("page", htmlPage); - context.put("head", htmlPage.getHead()); - context.put("title", htmlPage.getTitle()); - context.put("body", htmlPage.getBody()); - - // finally, render it - PrintWriter writer = response.getWriter(); - template.merge(context, writer); - writer.flush(); - } catch (Exception e) { - String msg = "Error applying decorator to request: " + request.getRequestURL() + "?" + request.getQueryString() + " with message:" + e.getMessage(); - LOG.error(msg, e); - throw new ServletException(msg, e); - } - } - -} - diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java deleted file mode 100644 index 2e61f1e19a..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/StrutsSiteMeshFactory.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.Config; -import com.opensymphony.module.sitemesh.factory.DefaultFactory; -import com.opensymphony.xwork2.ActionContext; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.StrutsStatics; - -public class StrutsSiteMeshFactory extends DefaultFactory { - - private static final Logger LOG = LogManager.getLogger(StrutsSiteMeshFactory.class); - - public StrutsSiteMeshFactory(Config config) { - super(config); - } - - /** - * Determine whether a Page of given content-type should be parsed or not, avoiding inner action parsing. - */ - @Override - public boolean shouldParsePage(String contentType) { - return !isInsideActionTag() && super.shouldParsePage(contentType); - } - - private boolean isInsideActionTag() { - if(ActionContext.getContext() == null) { - LOG.trace("ActionContext is null! Not a user request?"); - return false; - } - Object attribute = ServletActionContext.getRequest().getAttribute(StrutsStatics.STRUTS_ACTION_TAG_INVOCATION); - return (Boolean) ObjectUtils.defaultIfNull(attribute, Boolean.FALSE); - } - -} 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 deleted file mode 100644 index b05e45da06..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - - -import com.opensymphony.module.sitemesh.Config; -import com.opensymphony.module.sitemesh.Decorator; -import com.opensymphony.module.sitemesh.DecoratorMapper; -import com.opensymphony.module.sitemesh.Factory; -import com.opensymphony.module.sitemesh.HTMLPage; -import com.opensymphony.module.sitemesh.RequestConstants; -import com.opensymphony.module.sitemesh.util.OutputConverter; -import com.opensymphony.xwork2.ActionContext; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.dispatcher.Dispatcher; -import org.apache.struts2.dispatcher.listener.StrutsListener; -import org.apache.struts2.views.velocity.StrutsVelocityManager; -import org.apache.struts2.views.velocity.VelocityManager; -import org.apache.velocity.Template; -import org.apache.velocity.context.Context; -import org.apache.velocity.runtime.RuntimeConstants; -import org.apache.velocity.tools.view.VelocityView; -import org.apache.velocity.tools.view.VelocityViewServlet; - -import java.io.IOException; -import java.io.StringWriter; - -/** - *

This is a SiteMesh Velocity view servlet.

- * - *

It overrides the SiteMesh servlet to rely on the - * Velocity Manager in Struts instead of creating it's - * own manager

- */ -public class VelocityDecoratorServlet extends VelocityViewServlet { - - private static final Logger LOG = LogManager.getLogger(VelocityDecoratorServlet.class); - - private static final long serialVersionUID = -6731485159371716918L; - - protected VelocityManager velocityManager; - protected String defaultContentType; - - /** - *

Initializes servlet, toolbox and Velocity template engine. - * Called by the servlet container on loading.

- * - *

NOTE: If no charset is specified in the default.contentType - * property (in your velocity.properties) and you have specified - * an output.encoding property, then that will be used as the - * charset for the default content-type of pages served by this - * servlet.

- * - * @param config servlet configuration - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); - Dispatcher dispatcher = Dispatcher.getInstance(getServletContext()); - if (dispatcher == null) { - throw new IllegalStateException("Unable to find the Dispatcher in the Servlet Context. Is '" + StrutsListener.class.getName() + "' missing in web.xml?"); - } - velocityManager = dispatcher.getContainer().getInstance(VelocityManager.class); - velocityManager.init(config.getServletContext()); - - // do whatever we have to do to init Velocity - getVelocityView().setVelocityEngine(velocityManager.getVelocityEngine()); - // toolboxManager = velocityManager.getToolboxManager(); - - - // we can get these now that velocity is initialized - defaultContentType = getVelocityProperty(VelocityView.CONTENT_TYPE_KEY, VelocityView.DEFAULT_CONTENT_TYPE); - - String encoding = getVelocityProperty(RuntimeConstants.ENCODING_DEFAULT, VelocityView.DEFAULT_OUTPUT_ENCODING); - - // For non Latin-1 encodings, ensure that the charset is - // included in the Content-Type header. - if (!VelocityView.DEFAULT_OUTPUT_ENCODING.equalsIgnoreCase(encoding)) { - int index = defaultContentType.lastIndexOf("charset"); - if (index < 0) { - // the charset specifier is not yet present in header. - // append character encoding to default content-type - defaultContentType += "; charset=" + encoding; - } else { - // The user may have configuration issues. - getVelocityView().getVelocityEngine().getLog().warn("VelocityViewServlet: Charset was already " + "specified in the Content-Type property. " + "Output encoding property will be ignored."); - } - } - - getVelocityView().getVelocityEngine().getLog().info("VelocityViewServlet: Default content-type is: " + defaultContentType); - } - - public Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context context) { - HTMLPage htmlPage = (HTMLPage) request.getAttribute(RequestConstants.PAGE); - String template; - - context.put("base", request.getContextPath()); - // For backwards compatibility with apps that used the old VelocityDecoratorServlet - // that extended VelocityServlet instead of VelocityViewServlet - context.put("req", request); - context.put("res", response); - - if (htmlPage == null) { - context.put("title", "Title?"); - context.put("body", "

Body?

"); - context.put("head", ""); - template = request.getServletPath(); - } else { - try { - context.put("title", OutputConverter.convert(htmlPage.getTitle())); - { - StringWriter buffer = new StringWriter(); - htmlPage.writeBody(OutputConverter.getWriter(buffer)); - context.put("body", buffer.toString()); - } - { - StringWriter buffer = new StringWriter(); - htmlPage.writeHead(OutputConverter.getWriter(buffer)); - context.put("head", buffer.toString()); - } - } catch (IOException e) { - LOG.error("IOException handle request template", e); - } - context.put("page", htmlPage); - DecoratorMapper decoratorMapper = getDecoratorMapper(); - Decorator decorator = decoratorMapper.getDecorator(request, htmlPage); - template = decorator.getPage(); - } - - return getTemplate(template); - } - - private DecoratorMapper getDecoratorMapper() { - Factory factory = Factory.getInstance(new Config(getServletConfig())); - return factory.getDecoratorMapper(); - } - - /** - *

Creates and returns an initialized Velocity context.

- * - * @param request servlet request from client - * @param response servlet reponse to client - */ - protected Context createContext(HttpServletRequest request, HttpServletResponse response) { - Context context = (Context) request.getAttribute(StrutsVelocityManager.KEY_VELOCITY_STRUTS_CONTEXT); - if (context == null) { - ActionContext ctx = ServletActionContext.getActionContext(request); - context = velocityManager.createContext(ctx.getValueStack(), request, response); - } - return context; - } - - /** - *

- * Sets the content type of the response. This is available to be overridden - * by a derived class. - *

- *

The default implementation is:

- *
-     *
-     *    response.setContentType(defaultContentType);
-     *
-     * 
- *

- * where defaultContentType is set to the value of the default.contentType - * property, or "text/html" if that is not set.

- * - * @param request servlet request from client - * @param response servlet reponse to client - */ - protected void setContentType(HttpServletRequest request, HttpServletResponse response) { - response.setContentType(defaultContentType); - } - -} diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityMapper2DecoratorSelector.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityMapper2DecoratorSelector.java deleted file mode 100644 index 5d0ef6a6f5..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityMapper2DecoratorSelector.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.Decorator; -import com.opensymphony.module.sitemesh.DecoratorMapper; -import com.opensymphony.sitemesh.DecoratorSelector; -import com.opensymphony.sitemesh.Content; -import com.opensymphony.sitemesh.SiteMeshContext; -import com.opensymphony.sitemesh.compatability.Content2HTMLPage; -import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext; -import com.opensymphony.sitemesh.webapp.decorator.NoDecorator; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * Returns a {@link OldDecorator2NewStrutsVelocityDecorator} decorator - * for a velocity request. - * - * Won't decorate the output if it finds a "decorator" flag in the request - */ -public class VelocityMapper2DecoratorSelector implements DecoratorSelector { - - private final DecoratorMapper decoratorMapper; - - public VelocityMapper2DecoratorSelector(DecoratorMapper decoratorMapper) { - this.decoratorMapper = decoratorMapper; - } - - public com.opensymphony.sitemesh.Decorator selectDecorator(Content content, SiteMeshContext context) { - SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context; - HttpServletRequest request = webAppContext.getRequest(); - Decorator decorator = - decoratorMapper.getDecorator(request, new Content2HTMLPage(content, request)); - if (decorator == null || decorator.getPage() == null) { - return new NoDecorator(); - } else { - return new OldDecorator2NewStrutsVelocityDecorator(decorator); - } - } -} - diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java deleted file mode 100644 index c6b2f85699..0000000000 --- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityPageFilter.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.sitemesh; - -import com.opensymphony.module.sitemesh.Config; -import com.opensymphony.module.sitemesh.Factory; -import com.opensymphony.sitemesh.DecoratorSelector; -import com.opensymphony.sitemesh.webapp.SiteMeshFilter; -import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext; -import com.opensymphony.xwork2.inject.Inject; -import jakarta.servlet.FilterConfig; -import org.apache.struts2.views.velocity.VelocityManager; - -/** - * Core Filter for integrating SiteMesh into a Java web application. - */ -public class VelocityPageFilter extends SiteMeshFilter { - - @Inject(required = false) - public static void setVelocityManager(VelocityManager mgr) { - OldDecorator2NewStrutsVelocityDecorator.setVelocityManager(mgr); - } - - private FilterConfig filterConfig; - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - super.init(filterConfig); - } - - protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) { - // TODO: Remove heavy coupling on horrible SM2 Factory - Factory factory = Factory.getInstance(new Config(filterConfig)); - factory.refresh(); - return new VelocityMapper2DecoratorSelector(factory.getDecoratorMapper()); - } - -} - diff --git a/plugins/sitemesh/src/main/resources/LICENSE.txt b/plugins/sitemesh/src/main/resources/LICENSE.txt deleted file mode 100644 index dd5b3a58aa..0000000000 --- a/plugins/sitemesh/src/main/resources/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/plugins/sitemesh/src/main/resources/NOTICE.txt b/plugins/sitemesh/src/main/resources/NOTICE.txt deleted file mode 100644 index cf1ea31e29..0000000000 --- a/plugins/sitemesh/src/main/resources/NOTICE.txt +++ /dev/null @@ -1,8 +0,0 @@ -Apache Struts -Copyright 2000-2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -The binary distributions includes the following third party software: -SiteMesh (http://www.opensymphony.com/sitemesh/). diff --git a/plugins/sitemesh/src/main/resources/SITEMESH-LICENSE.txt b/plugins/sitemesh/src/main/resources/SITEMESH-LICENSE.txt deleted file mode 100644 index 6748a870be..0000000000 --- a/plugins/sitemesh/src/main/resources/SITEMESH-LICENSE.txt +++ /dev/null @@ -1,51 +0,0 @@ -/* ==================================================================== - * The OpenSymphony Software License, Version 1.1 - * - * (this license is derived and fully compatible with the Apache Software - * License - see http://www.apache.org/LICENSE.txt) - * - * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * OpenSymphony Group (http://www.opensymphony.com/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "OpenSymphony" and "The OpenSymphony Group" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact license@opensymphony.com . - * - * 5. Products derived from this software may not be called "OpenSymphony" - * or "SiteMesh", nor may "OpenSymphony" or "SiteMesh" appear in their - * name, without prior written permission of the OpenSymphony Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - */ - \ No newline at end of file diff --git a/plugins/sitemesh/src/main/resources/struts-plugin.xml b/plugins/sitemesh/src/main/resources/struts-plugin.xml deleted file mode 100644 index 694e393e2f..0000000000 --- a/plugins/sitemesh/src/main/resources/struts-plugin.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/plugins/sitemesh/src/site/site.xml b/plugins/sitemesh/src/site/site.xml deleted file mode 100644 index 54fdcf4f47..0000000000 --- a/plugins/sitemesh/src/site/site.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - org.apache.maven.skins - maven-fluido-skin - ${fluido-skin.version} - - - Apache Software Foundation - http://www.apache.org/images/asf-logo.gif - http://www.apache.org/ - - - Apache Struts - http://struts.apache.org/img/struts-logo.svg - http://struts.apache.org/ - - - - - - - - - - - - -
- - Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project - logos are trademarks of The Apache Software Foundation. - ]]> -
- - diff --git a/pom.xml b/pom.xml index dbe52b2905..fb5794ac6c 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,6 @@ 3.5.0 5.8.0 3.3.5 - 2.5.0 2.0.16 6.0.13 3.0.8 @@ -407,7 +406,7 @@ maven-site-plugin 3.20.0 - false + false @@ -568,11 +567,6 @@ struts2-rest-plugin ${project.version} - - org.apache.struts - struts2-sitemesh-plugin - ${project.version} - org.apache.struts struts2-testng-plugin @@ -643,12 +637,6 @@ 1.4.1 - - opensymphony - sitemesh - ${sitemesh.version} - - org.apache.velocity