You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by bu...@apache.org on 2018/02/18 17:21:12 UTC

svn commit: r1025563 [2/2] - in /websites/production/tapestry/content: assets.html beaneditform-guide.html cache/main.pageCache css.html environmental-services.html forms-and-validation.html injection.html logging.html uploading-files.html

Modified: websites/production/tapestry/content/logging.html
==============================================================================
--- websites/production/tapestry/content/logging.html (original)
+++ websites/production/tapestry/content/logging.html Sun Feb 18 17:21:12 2018
@@ -75,7 +75,7 @@
       </div>
 
       <div id="content">
-                <div id="ConfluenceContent"><p><strong>Logging</strong> involves the automatic recording of progress as an application runs. Tapestry makes extensive use of <a  class="external-link" href="http://www.slf4j.org/" rel="nofollow">SLF4J</a> to log details about the creation and operation of your page and component classes.</p><div class="aui-label" style="float:right" title="Related Articles">
+                <div id="ConfluenceContent"><p>&#160;</p><p><strong>Logging</strong> involves the automatic recording of progress as an application runs. Tapestry makes extensive use of <a  class="external-link" href="http://www.slf4j.org/" rel="nofollow">SLF4J</a> to log details about the creation and operation of your page and component classes.</p><div class="aui-label" style="float:right" title="Related Articles">
 
 
 
@@ -108,10 +108,9 @@
 </div>
 
 
-<p>The default configuration for logging uses <a  class="external-link" href="http://logging.apache.org/log4j/">Log4J</a> as the logging toolkit, though <a  href="logging.html">this can be changed</a>.</p><h1 id="Logging-ClasstoLogger">Class to Logger</h1><p>The logger name for a page or component matches the fully qualified class name. You can configure this in log4j.properties:</p><div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
-<pre>log4j.category.org.apache.tapestry5.integration.app1.pages.MerryChristmas=trace
-</pre>
-</div></div><h1 id="Logging-InjectingLoggers">Injecting Loggers</h1><p>You may mark a field of type <a  class="external-link" href="http://www.slf4j.org/api/org/slf4j/Logger.html" rel="nofollow">Logger</a> with the @Inject annotation. The proper Logger for your page or component will be injected.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>The default configuration for logging uses <a  class="external-link" href="http://logging.apache.org/log4j/">Log4J</a> as the logging toolkit, though <a  href="logging-in-tapestry.html">this can be changed</a>.</p><h1 id="Logging-ClasstoLogger">Class to Logger</h1><p>The logger name for a page or component matches the fully qualified class name. You can configure this in log4j.properties:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>log4j.properties</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">log4j.category.org.apache.tapestry5.integration.app1.pages.MerryChristmas=trace</pre>
+</div></div><p>&#160;</p><h1 id="Logging-InjectingLoggers">Injecting Loggers</h1><p>You may mark a field of type <a  class="external-link" href="http://www.slf4j.org/api/org/slf4j/Logger.html" rel="nofollow">Logger</a> with the @Inject annotation. The proper Logger for your page or component will be injected.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>MyPage.java</b></div><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class MyPage
 {
     @Inject

Modified: websites/production/tapestry/content/uploading-files.html
==============================================================================
--- websites/production/tapestry/content/uploading-files.html (original)
+++ websites/production/tapestry/content/uploading-files.html Sun Feb 18 17:21:12 2018
@@ -118,7 +118,7 @@
 
         return this;
     }</pre>
-</div></div><p>Note the importance of <code>return this;</code>. A void event handler method, or one that returns null, will result in the FileUploadException being reported to the user as an uncaught runtime exception.</p><h1 id="UploadingFiles-Configuration">Configuration</h1><p>Four values may be configured as <a  href="uploading-files.html">symbols</a>:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-location</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>The directory to which files that are too large to keep in memory will be written to. The default is from the <a  class="external-link" href="http://java.io" rel="nofollow">java.io</a>.tmpdir system property.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-threshold</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Upload size, in bytes, at which point the uploaded file is writ
 ten to disk rather than kept in memory. The default is 10 kilobytes.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.requestsize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximim size, in bytes, for the overall request. If exceeded, a FileUploadException will occur. The default is no maximum.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.filesize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximum size, in bytes, for any individual uploaded file. Again, a FileUploadException will occur if exceeded. The default is no maximum.</p></td></tr></tbody></table></div><p>The class <a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/upload/services/UploadSymbols.html">UploadSymbols</a> defines constants for all four of these.</p><h1 id="UploadingFiles-PotentialIssues">Potential Issues</h1><p>The Commons FileUpload library uses the CommonsIO file clean
 er service to remove temporary files when they are no longer needed. This service creates a thread to carry out its work. If the commons-io library is shared amongst multiple applications (e.g. added to server classpath) it is possible for an application to terminate this thread prematurely and cause errors for the other applications. (see the <a  class="external-link" href="http://jakarta.apache.org/commons/fileupload/using.html">Resource Cleanup</a> section in for more discussion)</p><p>Technically the file cleanup service is not needed by Tapestry Upload (which deletes temporary files at the end of request processing). However it is currently not possible to disable it (enhancement request has been filed as <a  class="external-link" href="https://issues.apache.org/jira/browse/FILEUPLOAD-133">FILEUPLOAD-133</a>).</p></div>
+</div></div><p>Note the importance of <code>return this;</code>. A void event handler method, or one that returns null, will result in the FileUploadException being reported to the user as an uncaught runtime exception.</p><h1 id="UploadingFiles-Configuration">Configuration</h1><p>Four values may be configured as <a  href="configuration.html">symbols</a>:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-location</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>The directory to which files that are too large to keep in memory will be written to. The default is from the java.io.tmpdir system property.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-threshold</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Upload size, in bytes, at which point the uploaded file is written to disk rather than kept in memory. The default is 10 kilobytes.<
 /p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.requestsize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximim size, in bytes, for the overall request. If exceeded, a FileUploadException will occur. The default is no maximum.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.filesize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximum size, in bytes, for any individual uploaded file. Again, a FileUploadException will occur if exceeded. The default is no maximum.</p></td></tr></tbody></table></div><p>The class <a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/upload/services/UploadSymbols.html">UploadSymbols</a> defines constants for all four of these.</p><h1 id="UploadingFiles-PotentialIssues">Potential Issues</h1><p>The Commons FileUpload library uses the CommonsIO file cleaner service to remove temporary files when they are no longer needed. 
 This service creates a thread to carry out its work. If the commons-io library is shared amongst multiple applications (e.g. added to server classpath) it is possible for an application to terminate this thread prematurely and cause errors for the other applications. (see the <a  class="external-link" href="http://jakarta.apache.org/commons/fileupload/using.html">Resource Cleanup</a> section in for more discussion)</p><p>Technically the file cleanup service is not needed by Tapestry Upload (which deletes temporary files at the end of request processing). However it is currently not possible to disable it (enhancement request has been filed as <a  class="external-link" href="https://issues.apache.org/jira/browse/FILEUPLOAD-133">FILEUPLOAD-133</a>).</p></div>
       </div>
 
       <div class="clearer"></div>