struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts-site git commit: Cleans up pages
Date Wed, 23 Aug 2017 11:26:31 GMT
Repository: struts-site
Updated Branches:
  refs/heads/master 3e113c51f -> 5941b7eda


Cleans up pages


Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/5941b7ed
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/5941b7ed
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/5941b7ed

Branch: refs/heads/master
Commit: 5941b7edace8be7891fe779355893058e5e32599
Parents: 3e113c5
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Wed Aug 23 13:26:21 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Wed Aug 23 13:26:21 2017 +0200

----------------------------------------------------------------------
 source/core-developers/application-servers.md | 37 ++++-----
 source/core-developers/index.md               |  4 +-
 source/core-developers/performance-tuning.md  | 91 +++++++++++++---------
 source/core-developers/struts-default-vm.md   | 16 +---
 source/core-developers/velocity-properties.md | 24 ++----
 5 files changed, 79 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-site/blob/5941b7ed/source/core-developers/application-servers.md
----------------------------------------------------------------------
diff --git a/source/core-developers/application-servers.md b/source/core-developers/application-servers.md
index e368168..c4edd0d 100644
--- a/source/core-developers/application-servers.md
+++ b/source/core-developers/application-servers.md
@@ -5,26 +5,17 @@ title: Application Servers
 
 # Application Servers
 
-The framework is known to work well with most application servers\. If a server's name is
linked,  then there may be some extra steps to obtain full functionality\.
-
-+ Jetty
-
-+ JRun
-
-+ OC4J
-
-+ Orion
-
-+ Resin
-
-+ [SunOne 7.0](sunone-7-0.html)
-
-+ [JBoss 5](jboss-5.html)
-
-+ [WebLogic](weblogic.html)
-
-+ [WebLogic 6.1](weblogic-6-1.html)
-
-+ [WebSphere](websphere.html)
-
-+ [Glassfish 2\.x](glassfish-2-x.html)
+The framework is known to work well with most application servers. If a server's name is
linked, then there may 
+be some extra steps to obtain full functionality.
+
+- Jetty
+- JRun
+- OC4J
+- Orion
+- Resin
+- [SunOne 7.0](sunone-7-0.html)
+- [JBoss 5](jboss-5.html)
+- [WebLogic](weblogic.html)
+- [WebLogic 6.1](weblogic-6-1.html)
+- [WebSphere](websphere.html)
+- [Glassfish 2.x](glassfish-2-x.html)

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5941b7ed/source/core-developers/index.md
----------------------------------------------------------------------
diff --git a/source/core-developers/index.md b/source/core-developers/index.md
index 3fad4ae..1f28710 100644
--- a/source/core-developers/index.md
+++ b/source/core-developers/index.md
@@ -28,10 +28,10 @@ Each may be configured via XML or annotations.
 - [Configuration Files](configuration-files.html)
   - [web.xml](web-xml.html)
   - [struts.xml](struts-xml.html)
-  - [struts.properties](struts-properties.html)
+  - [default.properties](default-properties.html)
   - [struts-default.xml](struts-default-xml.html)
   - [velocity.properties](velocity-properties.html)
-  - [struts\-default\.vm](struts-default-vm.html)
+  - [struts-default.vm](struts-default-vm.html)
 - [Application Servers](application-servers.html)
 - [Performance Tuning](performance-tuning.html)
 - [Security](../security/)

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5941b7ed/source/core-developers/performance-tuning.md
----------------------------------------------------------------------
diff --git a/source/core-developers/performance-tuning.md b/source/core-developers/performance-tuning.md
index 42de03c..84016c0 100644
--- a/source/core-developers/performance-tuning.md
+++ b/source/core-developers/performance-tuning.md
@@ -5,69 +5,86 @@ title: Performance Tuning
 
 # Performance Tuning
 
-####Performance tuning####
+## Performance tuning
 
-The following are some tips and tricks to squeeze the most performance out of Struts 2\.
+The following are some tips and tricks to squeeze the most performance out of Struts 2.
 
+> For Struts 2 versions before 2.3: the OGNL version 3.0.3 library is a drop-in replacement
for older OGNL jars,
+> and provides **much** better performance. See the following JIRA issue for more information:

+> [https://issues.apache.org/jira/browse/WW-3580](https://issues.apache.org/jira/browse/WW-3580)
 
+## Turn off logging and devMode
 
-| For Struts 2 versions before 2\.3: the OGNL version 3\.0\.3 library is a drop\-in replacement
for older OGNL jars, and provides **much** better performance\. See the following Jira issue
for more information: [https://issues\.apache\.org/jira/browse/WW\-3580](https://issues\.apache\.org/jira/browse/WW\-3580)
+The [devMode](development-mode.html) allows reloading of configuration and validation related
files, but because they 
+happen on each request, this setting will totally kill your performance.
+When using logging, make sure to turn off logging (esp. Freemarker generates a LOT of logging),
and check if a level is 
+enabled before printing it, or you will get the cost of the String parsing/concatenation
anyways.
 
-| 
+## Use the Java Templates
 
-#####Turn off logging and devMode\.#####
+If you use the simple theme, and do not overwrite any of the FreeMarker templates, consider
using the [java templates](../plugins/javatemplates-plugin/),
+which provide a drop in replacement for most tags, and are a lot faster than the regular
tags.
 
-[devMode](development-mode.html) allows reloading of configuration and validation related
files, but because they happen on each request, this setting will totally kill your performance\.
- When using logging, make sure to turn off logging (esp\. Freemarker generates a LOT of logging),
and check if a level is enabled before printing it, or you will get the cost of the String
parsing/concatination anyways\.
+## Do not use interceptors you do not need
 
-#####Use the Java Templates#####
+If you do not require a full stack of interceptors for an Action, then try using a different
one (basicStack), 
+or remove interceptors you do not need. Remove the I18nInterceptor interceptor if you don't
need it, as it can cause 
+a session to be created.
 
-If you use the simple theme, and do not overwrite any of the FreeMarker templates, consider
using the _java templates_ , which provide a drop in replacement for most tags, and are a
lot faster than the regular tags\.
+## Use the correct HTTP headers (Cache-Control & Expires)
 
-#####Do not use interceptors you do not need\.#####
+When returning HTML views, make sure to add the correct headers so browsers know how to cache
them.
 
-If you do not require a full stack of interceptors for an Action, then try using a different
one (basicStack), or remove interceptors you do not need\. Remove the I18nInterceptor interceptor
if you don't need it, as it can cause a session to be created\.
+## Copy the static content from the Struts 2 jar when using the Ajax theme (Dojo) or the
Calendar tag
 
-#####Use the correct HTTP headers (Cache\-Control & Expires)\.#####
+Struts 2 uses some external javascript libraries and cascading stylesheets for certain themes
and tags. These by default 
+are located inside the Struts 2 jar, and a special filter returns them when requesting a
special path (`/struts`). 
+Although Struts 2 can handle these requests, an application/servlet container is not optimized
for these kind of requests. 
+Consider moving these .js and .css files to a seperated server (Lighttpd, Apache HTTPD, ..).
 
-When returning HTML views, make sure to add the correct headers so browsers know how to cache
them\.
+## Create a freemarker.properties file in your WEB-INF/classes directory
 
-#####Copy the static content from the Struts 2 jar when using the Ajax theme (Dojo) or the
Calendar tag\.#####
+Create the freemarker.properties file and add the following setting (or whatever value you
deem fitting):
 
-Struts 2 uses some external javascript libraries and cascading stylesheets for certain themes
and tags\. These by default are located inside the Struts 2 jar, and a special filter returns
them when requesting a special path (/struts)\. Although Struts 2 can handle these requests,
an application/servlet container is not optimized for these kind of requests\. Consider moving
these \.js and \.css files to a seperated server (Lighttpd, Apache HTTPD, \.\.)\.
-
-#####Create a freemarker\.properties file in your WEB\-INF/classes directory\.#####
-
-Create the freemarker\.properties file and add the following setting (or whatever value you
deem fitting):
-
-
-~~~~~~~
+```
 template_update_delay=60000
+```
 
-~~~~~~~
-
-This value determines how often Freemarker checks if it needs to reloads the templates from
disk\. The default value is 500 ms\. Since there is no reason to check if a template needs
reloading, it is best to set this to a very large value\. Note that this value is in seconds
and freemarker will convert this value to milliseconds\.
+This value determines how often Freemarker checks if it needs to reloads the templates from
disk. The default value 
+is 500 ms. Since there is no reason to check if a template needs reloading, it is best to
set this to a very large value. 
+Note that this value is in seconds and freemarker will convert this value to milliseconds.
 
-You can also use _struts\.freemarker\.templatesCache\.updateDelay_  constant to achieve
the same effect\.
+You can also use `struts.freemarker.templatesCache.updateDelay` constant to achieve the
same effect.
 
-See also: [Freemarker configuration properties](http://freemarker\.sourceforge\.net/docs/api/freemarker/template/Configuration\.html\#setSetting(java\.lang\.String,%20java\.lang\.String))^[http://freemarker\.sourceforge\.net/docs/api/freemarker/template/Configuration\.html\#setSetting(java\.lang\.String,%20java\.lang\.String)]
+See also: [Freemarker configuration properties](http://freemarker.sourceforge.net/docs/api/freemarker/template/Configuration.html\#setSetting(java.lang.String,%20java.lang.String))
 
-#####Enable Freemarker template caching#####
+## Enable Freemarker template caching
 
-As of Struts 2\.0\.10, setting the property _struts\.freemarker\.templatesCache_  to true
will enable the Struts internal caching of Freemarker templates\. This property is set to
false by default\.
+As of Struts 2.0.10, setting the property `struts.freemarker.templatesCache` to true will
enable the Struts internal 
+caching of Freemarker templates. This property is set to false by default.
 
-In Struts versions prior to 2\.0\.10, you had to copy the /template directory from the Struts
2 jar in your WEB\_APP root to utilize Freemarker's built in chaching mechanism in order to
achieve similar results\.
+In Struts versions prior to 2.0.10, you had to copy the `/template` directory from the Struts
2 jar in your `WEB_APP` 
+root to utilize Freemarker's built in caching mechanism in order to achieve similar results.
 
-The built in Freemarker caching mechanism fails to properly cache templates when they are
retrieved from the classpath\. Copying them to the WEB\_APP root allows Freemarker to cache
them correctly\. Freemarker looks at the last modified time of the template to determine if
it needs to reload the templates\. Resources retrieved from the classpath have no last modified
time, so Freemarker will reload them on every request\.
+The built in Freemarker caching mechanism fails to properly cache templates when they are
retrieved from the classpath. 
+Copying them to the WEB_APP root allows Freemarker to cache them correctly. Freemarker looks
at the last modified time 
+of the template to determine if it needs to reload the templates. Resources retrieved from
the classpath have no last 
+modified time, so Freemarker will reload them on every request.
 
-#####When overriding a theme, copy all necessary templates to the theme directory\.#####
+## When overriding a theme, copy all necessary templates to the theme directory
 
-There's a performance cost when a template cannot be found in the current directory\. The
reason for this is that Struts 2 must check for a template in the current theme first before
falling back to the parent theme\. In the future, this penalty could be eliminated by implementing
a missing template cache in Struts 2\.
+There's a performance cost when a template cannot be found in the current directory. The
reason for this is that 
+Struts 2 must check for a template in the current theme first before falling back to the
parent theme. In the future, 
+this penalty could be eliminated by implementing a missing template cache in Struts 2.
 
-#####Do not create sessions unless you need them\.#####
+## Do not create sessions unless you need them
 
-Struts 2 does not create sessions unless asked to (for example, by having the createSession
interceptor in your interceptor stack)\. Note that when you use SiteMesh however, a session
will **always** be created (See [http://forums\.opensymphony\.com/thread\.jspa?messageID=5688](http://forums\.opensymphony\.com/thread\.jspa?messageID=5688)
for details)\. The I18nInterceptor interceptor can create sessions, so make sure you remove
it, if you don't need it\.
+Struts 2 does not create sessions unless asked to (for example, by having the createSession
interceptor in your 
+interceptor stack). Note that when you use SiteMesh however, a session will **always** be
created. 
+The I18nInterceptor interceptor can create sessions, so make sure you remove it, if you don't
need it.
 
-#####When using Freemarker, try to use the Freemarker equivalent rather than using the JSP
tags\.#####
+## When using Freemarker, try to use the Freemarker equivalent rather than using the JSP
tags
 
-Freemarker has support for iterating lists, displaying properties, including other templates,
macro's, and so on\. There is a small performance cost when using the S2 tags instead of the
Freemarker equivalent (eg\. \<s:property value="foo"/\> should be replaced by \$\{foo\})\.
+Freemarker has support for iterating lists, displaying properties, including other templates,
macro's, and so on. 
+There is a small performance cost when using the S2 tags instead of the Freemarker equivalent

+(eg. `<s:property value="foo"/>` should be replaced by `${foo}`).

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5941b7ed/source/core-developers/struts-default-vm.md
----------------------------------------------------------------------
diff --git a/source/core-developers/struts-default-vm.md b/source/core-developers/struts-default-vm.md
index a4775fa..23a0dd5 100644
--- a/source/core-developers/struts-default-vm.md
+++ b/source/core-developers/struts-default-vm.md
@@ -5,18 +5,11 @@ title: struts-default.vm
 
 # struts-default.vm
 
-If Velocity is being use, the 
+If Velocity is being use, the `struts-default.vm` supplies some VelocityMacros that might
be useful.
 
-~~~~~~~
-struts-default.vm
-~~~~~~~
- supplies some VelocityMacros that might be useful\.
-
-**struts\-default\.vm**
-
-
-~~~~~~~
+**struts-default.vm**
 
+```
 #macro(bean $bean_name $name)
    #set ($name = $action.bean($bean_name))
 #end
@@ -34,5 +27,4 @@ struts-default.vm
 #macro(property $object $property)
 $!{ognl.findValue($property, $object)}
 #end
-
-~~~~~~~
+```

http://git-wip-us.apache.org/repos/asf/struts-site/blob/5941b7ed/source/core-developers/velocity-properties.md
----------------------------------------------------------------------
diff --git a/source/core-developers/velocity-properties.md b/source/core-developers/velocity-properties.md
index a35d9cd..3ef4d7b 100644
--- a/source/core-developers/velocity-properties.md
+++ b/source/core-developers/velocity-properties.md
@@ -5,27 +5,13 @@ title: velocity.properties
 
 # velocity.properties
 
-If a 
+If a `velocity.properties` is provided on the classpath (e.g., `/WEB-INF/classes`), it will
be loaded by Velocity.
 
-~~~~~~~
-velocity.properties
-~~~~~~~
- is provided on the classpath (e\.g\., 
-
-~~~~~~~
-/WEB-INF/classes
-~~~~~~~
-), it will be loaded by Velocity\.
-
-**velocity\.properties**
-
-
-~~~~~~~
+**velocity.properties**
 
+```
 # Velocity Macro libraries.
 velocimacro.library = action-default.vm, tigris-macros.vm, myapp.vm
+```
 
-~~~~~~~
-
-(light\-on) See [struts\-default\.vm](struts-default-vm.html) and the _Velocity_  documentation
for more information\.
-
+> See [struts-default.vm](struts-default-vm.html) and the [Velocity](velocity.html) documentation
for more information.


Mime
View raw message