This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch fix/sitemesh in repository https://gitbox.apache.org/repos/asf/struts-site.git
commit a8327a0be7954486bbb4d666d1b20806346937ac Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Sat Apr 20 15:39:02 2024 +0200 Fixes reference to the new filters and update plugins' layout --- source/_layouts/plugin.html | 59 ----------------------------- source/core-developers/web-xml.md | 2 +- source/plugins/async/index.md | 4 +- source/plugins/bean-validation/index.md | 4 +- source/plugins/cdi/index.md | 4 +- source/plugins/codebehind/index.md | 4 +- source/plugins/config-browser/index.md | 4 +- source/plugins/convention/converting.md | 3 ++ source/plugins/convention/index.md | 4 +- source/plugins/dwr/index.md | 4 +- source/plugins/embedded-jsp/index.md | 4 +- source/plugins/jasperreports/index.md | 4 +- source/plugins/java-8-support/index.md | 4 +- source/plugins/javatemplates/index.md | 4 +- source/plugins/jfreechart/index.md | 4 +- source/plugins/jsf/index.md | 4 +- source/plugins/json/index.md | 4 +- source/plugins/json/json-ajax-validation.md | 2 +- source/plugins/junit/index.md | 4 +- source/plugins/osgi/index.md | 4 +- source/plugins/oval/index.md | 4 +- source/plugins/plexus/index.md | 4 +- source/plugins/portlet-tiles/index.md | 4 +- source/plugins/portlet/index.md | 4 +- source/plugins/rest/index.md | 4 +- source/plugins/sitegraph/index.md | 4 +- source/plugins/sitemesh/index.md | 50 ++++++++++++------------ source/plugins/spring/index.md | 4 +- source/plugins/struts-1/index.md | 4 +- source/plugins/testng/index.md | 4 +- source/plugins/tiles-3/index.md | 4 +- source/plugins/tiles/index.md | 4 +- source/plugins/velocity/index.md | 2 +- 33 files changed, 84 insertions(+), 142 deletions(-) diff --git a/source/_layouts/plugin.html b/source/_layouts/plugin.html deleted file mode 100644 index b7ecc649e..000000000 --- a/source/_layouts/plugin.html +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"/> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <meta name="Date-Revision-yyyymmdd" content="20140918"/> - <meta http-equiv="Content-Language" content="en"/> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - - <title>{{ page.title }}</title> - - <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css"> - <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> - <link href="/css/main.css" rel="stylesheet"> - <link href="/css/custom.css" rel="stylesheet"> - <link href="/highlighter/github-theme.css" rel="stylesheet"> - - <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> - <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script> - <script type="text/javascript" src="/js/community.js"></script> - - <!-- Matomo --> - <script> - var _paq = window._paq = window._paq || []; - /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ - /* We explicitly disable cookie tracking to avoid privacy issues */ - _paq.push(['disableCookies']); - _paq.push(['trackPageView']); - _paq.push(['enableLinkTracking']); - (function() { - var u="//analytics.apache.org/"; - _paq.push(['setTrackerUrl', u+'matomo.php']); - _paq.push(['setSiteId', '41']); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); - })(); - </script> - <!-- End Matomo Code --> -</head> -<body> - -{% include header.html %} - -<article class="container"> - <section class="col-md-12"> - <a class="edit-on-gh" href="{{ site.repository_url }}/edit/master/source/{{ page.path }}" title="Edit this page on GitHub">Edit on GitHub</a> - {% if page.parent %} - <a href="{{ page.parent.url }}" title="back to {{ page.parent.title }}"><< back to {{ page.parent.title }}</a> - {% else %} - <a href="../" title="back to Plugins"><< back to Plugins</a> - {% endif %} - {{ content }} - </section> -</article> - -{% include footer.html %} - -</body> -</html> diff --git a/source/core-developers/web-xml.md b/source/core-developers/web-xml.md index 5e947b663..b56c4e1a4 100644 --- a/source/core-developers/web-xml.md +++ b/source/core-developers/web-xml.md @@ -43,7 +43,7 @@ Configuring `web.xml` for the framework is a matter of adding a filter and filte </web-app> ``` -See [SiteMesh Plugin](../plugins/sitemesh-plugin) for an example on when to use separate Filters for prepare and execution phase. +See [SiteMesh Plugin](../plugins/sitemesh/) for an example on when to use separate Filters for prepare and execution phase. ## Custom mapping diff --git a/source/plugins/async/index.md b/source/plugins/async/index.md index 7c19b29e4..46575b0fb 100644 --- a/source/plugins/async/index.md +++ b/source/plugins/async/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Async Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/bean-validation/index.md b/source/plugins/bean-validation/index.md index 51a6064e4..cd92687d9 100644 --- a/source/plugins/bean-validation/index.md +++ b/source/plugins/bean-validation/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Bean Validation Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/cdi/index.md b/source/plugins/cdi/index.md index e26cd3be1..d11f46d87 100644 --- a/source/plugins/cdi/index.md +++ b/source/plugins/cdi/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: CDI Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/codebehind/index.md b/source/plugins/codebehind/index.md index b4a785a39..cfd7d28cd 100644 --- a/source/plugins/codebehind/index.md +++ b/source/plugins/codebehind/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Codebehind Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/config-browser/index.md b/source/plugins/config-browser/index.md index 6e13b7977..d7be6cb04 100644 --- a/source/plugins/config-browser/index.md +++ b/source/plugins/config-browser/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Config Browser Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/convention/converting.md b/source/plugins/convention/converting.md index 1f45d2bbd..91574d1de 100644 --- a/source/plugins/convention/converting.md +++ b/source/plugins/convention/converting.md @@ -1,6 +1,9 @@ --- layout: default title: Converting application from Codebehind to Convention Plugin (WIP) +parent: + url: convention + title: Convention plugin --- [<< back to Convention Plugin](./) diff --git a/source/plugins/convention/index.md b/source/plugins/convention/index.md index c022b7dff..b308f88d4 100644 --- a/source/plugins/convention/index.md +++ b/source/plugins/convention/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Convention plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/dwr/index.md b/source/plugins/dwr/index.md index 5750205cf..40a99275a 100644 --- a/source/plugins/dwr/index.md +++ b/source/plugins/dwr/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: DWR Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/embedded-jsp/index.md b/source/plugins/embedded-jsp/index.md index 8fa8cc7b8..ba5bbb3cc 100644 --- a/source/plugins/embedded-jsp/index.md +++ b/source/plugins/embedded-jsp/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Embedded JSP Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/jasperreports/index.md b/source/plugins/jasperreports/index.md index 34086084b..156a58bcd 100644 --- a/source/plugins/jasperreports/index.md +++ b/source/plugins/jasperreports/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: JasperReports Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/java-8-support/index.md b/source/plugins/java-8-support/index.md index 30b36c10e..9b149eae2 100644 --- a/source/plugins/java-8-support/index.md +++ b/source/plugins/java-8-support/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Java 8 Support Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/javatemplates/index.md b/source/plugins/javatemplates/index.md index 664fe7498..425e93b96 100644 --- a/source/plugins/javatemplates/index.md +++ b/source/plugins/javatemplates/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Javatemplates Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/jfreechart/index.md b/source/plugins/jfreechart/index.md index 12be296e9..c24b335bf 100644 --- a/source/plugins/jfreechart/index.md +++ b/source/plugins/jfreechart/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: JFreeChart Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/jsf/index.md b/source/plugins/jsf/index.md index 0daa9f061..c55e1e996 100644 --- a/source/plugins/jsf/index.md +++ b/source/plugins/jsf/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: JSF Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/json/index.md b/source/plugins/json/index.md index 728664fd4..2865ca679 100644 --- a/source/plugins/json/index.md +++ b/source/plugins/json/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: JSON plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/json/json-ajax-validation.md b/source/plugins/json/json-ajax-validation.md index 80e621808..9409515f3 100644 --- a/source/plugins/json/json-ajax-validation.md +++ b/source/plugins/json/json-ajax-validation.md @@ -3,7 +3,7 @@ layout: plugin title: JSON Ajax validation parent: title: JSON plugin - url: index.html + url: index --- # JSON Ajax Validation diff --git a/source/plugins/junit/index.md b/source/plugins/junit/index.md index 225905e38..bf2cbdad9 100644 --- a/source/plugins/junit/index.md +++ b/source/plugins/junit/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: JUnit plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/osgi/index.md b/source/plugins/osgi/index.md index 08b4574da..2ffdc6cd5 100644 --- a/source/plugins/osgi/index.md +++ b/source/plugins/osgi/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: OSGi Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/oval/index.md b/source/plugins/oval/index.md index 43dddf7c2..68f1acc69 100644 --- a/source/plugins/oval/index.md +++ b/source/plugins/oval/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: OVal Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/plexus/index.md b/source/plugins/plexus/index.md index 384d905ec..2a6efdb34 100644 --- a/source/plugins/plexus/index.md +++ b/source/plugins/plexus/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Plexus Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/portlet-tiles/index.md b/source/plugins/portlet-tiles/index.md index e385550da..e0e53678b 100644 --- a/source/plugins/portlet-tiles/index.md +++ b/source/plugins/portlet-tiles/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Portlet Tiles Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/portlet/index.md b/source/plugins/portlet/index.md index 711a83b30..7c50faaa4 100644 --- a/source/plugins/portlet/index.md +++ b/source/plugins/portlet/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Portlet Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/rest/index.md b/source/plugins/rest/index.md index 5c903ffff..d66799e19 100644 --- a/source/plugins/rest/index.md +++ b/source/plugins/rest/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: REST Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/sitegraph/index.md b/source/plugins/sitegraph/index.md index 4dcfc2065..3be8afd8f 100644 --- a/source/plugins/sitegraph/index.md +++ b/source/plugins/sitegraph/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: SiteGraph Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/sitemesh/index.md b/source/plugins/sitemesh/index.md index 5a32f521d..7afd9a8d5 100644 --- a/source/plugins/sitemesh/index.md +++ b/source/plugins/sitemesh/index.md @@ -1,9 +1,9 @@ --- -layout: plugin +layout: default title: SiteMesh Plugin parent: - url: /plugins title: Plugins + url: plugins --- # SiteMesh Plugin @@ -17,7 +17,8 @@ parent: ## About SiteMesh > [SiteMesh](http://www.sitemesh.org/) is a web-page layout and decoration > framework and web application integration -> framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required. +> framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation +> and layout scheme is required. The Sitemesh plugin allows Sitemesh templates to access framework resources. @@ -33,7 +34,7 @@ with the framework. That's it! ## Usage From 2.2+ the new `com.opensymphony.sitemesh.webapp.SiteMeshFilter` filter -and Struts `org.apache.struts2.dispatcher.ng.listener.StrutsListener` context listener must be added to `web.xml`, like: +and Struts `org.apache.struts2.dispatcher.listener.StrutsListener` context listener must be added to `web.xml`, like: ```xml <filter> @@ -42,15 +43,15 @@ and Struts `org.apache.struts2.dispatcher.ng.listener.StrutsListener` context li </filter> ... <listener> - <listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class> + <listener-class>org.apache.struts2.dispatcher.listener.StrutsListener</listener-class> </listener> ``` -## FreeMarker and Velocity Decorators +## FreeMarker and Velocity Decorators -The plugin provides an extension of the SiteMesh _Velocity_ and _FreeMarker_ servlets. These servlets provide -the standard variables and _Struts Tags_ that you used to create views in your favourite template language. +The plugin provides an extension of the SiteMesh _Velocity_ and _FreeMarker_ servlets. These servlets provide +the standard variables and _Struts Tags_ that you used to create views in your favourite template language. ### FreeMarker @@ -84,13 +85,12 @@ From 2.2+ the recommended way to use Velocity with Sitemesh is through the `org. servlet, which can be configured like this in `web.xml`: ```xml - <servlet> <servlet-name>sitemesh-freemarker</servlet-name> <servlet-class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-class> <init-param> - <param-name>default_encoding</param-name> - <param-value>UTF-8</param-value> + <param-name>default_encoding</param-name> + <param-value>UTF-8</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> @@ -98,8 +98,7 @@ servlet, which can be configured like this in `web.xml`: <servlet-mapping> <servlet-name>sitemesh-freemarker</servlet-name> <url-pattern>*.ftl</url-pattern> -</servlet-mapping> - +</servlet-mapping> ``` ### Full integration with SiteMesh 2 + Freemarker 2.4.2 + Velocity 1.3 , including Struts 2 Tags, ValueStack, and FreemarkerManager statics. @@ -107,10 +106,9 @@ servlet, which can be configured like this in `web.xml`: Such configuration is available as from Struts 2.2.0, please refer to [WW-3296](https://issues.apache.org/jira/browse/WW-3296) for me details. ```xml - <filter> <filter-name>struts-prepare</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class> </filter> <filter> @@ -120,7 +118,7 @@ Such configuration is available as from Struts 2.2.0, please refer to [WW-3296]( <filter> <filter-name>struts-execute</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class> </filter> <filter-mapping> @@ -175,12 +173,12 @@ Here is an example of how to configure the filter chains in `web.xml`: ```xml <filter> <filter-name>struts-prepare</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class> </filter> <filter> <filter-name>struts-execute</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class> </filter> @@ -205,7 +203,7 @@ Here is an example of how to configure the filter chains in `web.xml`: </filter-mapping> <listener> - <listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class> + <listener-class>org.apache.struts2.dispatcher.listener.StrutsListener</listener-class> </listener> <servlet> @@ -245,12 +243,12 @@ Struts 2.1 web.xml filter chain example: ```xml <filter> <filter-name>struts-prepare</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class> </filter> <filter> <filter-name>struts-execute</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class> </filter> <filter> @@ -272,16 +270,15 @@ Struts 2.1 web.xml filter chain example: <filter-name>struts-execute</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> - ``` -You do not need the struts2-sitmesh-plugin if you are using JSP for your decorators. +You do not need the Struts2 Sitmesh plugin if you are using JSP for your decorators. Here are the only changes needed to web.xml ```xml <filter> <filter-name>struts2-prepare</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class> </filter> <filter> @@ -291,7 +288,7 @@ Here are the only changes needed to web.xml <filter> <filter-name>struts2-execute</filter-name> - <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class> + <filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class> </filter> <filter-mapping> @@ -320,4 +317,5 @@ This plugin doesn't support any global settings. ## Installation -This plugin can be installed by copying the plugin jar into your application's `/WEB-INF/lib` directory. No other files need to be copied or created. +This plugin can be installed by copying the plugin jar into your application's `/WEB-INF/lib` directory. +No other files need to be copied or created. diff --git a/source/plugins/spring/index.md b/source/plugins/spring/index.md index 51d956eed..1f3c93507 100644 --- a/source/plugins/spring/index.md +++ b/source/plugins/spring/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Spring Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/struts-1/index.md b/source/plugins/struts-1/index.md index bb8f8a7da..bf1a3cf83 100644 --- a/source/plugins/struts-1/index.md +++ b/source/plugins/struts-1/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Struts 1 Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/testng/index.md b/source/plugins/testng/index.md index efc041050..ce865fee3 100644 --- a/source/plugins/testng/index.md +++ b/source/plugins/testng/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: TestNG Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/tiles-3/index.md b/source/plugins/tiles-3/index.md index 725d3c114..afeb0311f 100644 --- a/source/plugins/tiles-3/index.md +++ b/source/plugins/tiles-3/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Tiles 3 Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/tiles/index.md b/source/plugins/tiles/index.md index cf911cad2..73f9d4a7c 100644 --- a/source/plugins/tiles/index.md +++ b/source/plugins/tiles/index.md @@ -1,8 +1,8 @@ --- -layout: plugin +layout: default title: Tiles Plugin parent: - url: /plugins + url: plugins title: Plugins --- diff --git a/source/plugins/velocity/index.md b/source/plugins/velocity/index.md index fd6791122..850cbae08 100644 --- a/source/plugins/velocity/index.md +++ b/source/plugins/velocity/index.md @@ -2,7 +2,7 @@ layout: default title: Velocity plugin parent: - url: /plugins + url: plugins title: Plugins ---