You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2013/11/11 23:13:16 UTC

svn commit: r1540864 [5/38] - in /wicket/common/site/trunk/_site/guide: ./ gapi/ gapi/DefaultPackage/ gapi/spring/ guide/ guide/pages/ guide/src/docs/guide/ guide/src/docs/img/ guide/src/docs/imgOrigin/ img/

Modified: wicket/common/site/trunk/_site/guide/guide/chapter19.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter19.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter19.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter19.html Mon Nov 11 22:13:12 2013
@@ -2,7 +2,7 @@
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-    <title>19 Security with Wicket 6.x</title>
+    <title>20 Security with Wicket 6.x</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
     <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter18.html">&lt;&lt; <strong>18</strong><span>Integration with enterprise containers</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter18.html">&lt;&lt; <strong>19</strong><span>Integration with enterprise containers</span></a></div>
                 
 
                 <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
 
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>19 Security with Wicket - Reference Documentation</h1>
+                    <h1>20 Security with Wicket - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,19 +156,19 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_1"><strong>19.1</strong><span>Authentication</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_1"><strong>20.1</strong><span>Authentication</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_2"><strong>19.2</strong><span>Authorizations</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_2"><strong>20.2</strong><span>Authorizations</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_3"><strong>19.3</strong><span>Using HTTPS protocol</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_3"><strong>20.3</strong><span>Using HTTPS protocol</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_4"><strong>19.4</strong><span>Package Resource Guard</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_4"><strong>20.4</strong><span>Package Resource Guard</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_5"><strong>19.5</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter19_5"><strong>20.5</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -173,11 +176,11 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter19">19 Security with Wicket</h1>
+<h1 id="chapter19">20 Security with Wicket</h1>
 Security is one of the most important non-functional requirements we must implement in our applications. This is particularly true for enterprise applications as they usually support multiple concurrent users, and therefore they need to have an access control policy.<p class="paragraph"/>In this chapter we will explore the security infrastructure provided by Wicket and we will learn how to use it to implement authentication and authorizations in our web applications.
 
 
-<h2 id="chapter19_1">19.1 Authentication</h2>
+<h2 id="chapter19_1">20.1 Authentication</h2>
 <p class="paragraph"/>The first step in implementing a security policy is assigning a trusted identity to our users, which means that we must authenticate them. Web applications usually adopt a form-based authentication with a login form that asks user for a unique username and the relative password:<p class="paragraph"/><img border="0" class="center" src="../img/wikipedia-login-form.png"></img><p class="paragraph"/>Wicket supports form-based authentication with session class AuthenticatedWebSession and application class AuthenticatedWebApplication, both placed inside package org.apache. wicket.authroles.authentication.<p class="paragraph"/><h3>AuthenticatedWebSession</h3><p class="paragraph"/>Class AuthenticatedWebSession comes with the following set of public methods to manage user authentication:
 <ul class="star">
 <li><strong class="bold">authenticate(String username, String password)</strong>: this is an abstract method that must be implemented by every subclass of AuthenticatedWebSession. It should contain the actual code that checks for user's identity. It returns a boolean value which is true if authentication has succeeded or false otherwise.</li>
@@ -256,7 +259,7 @@ Since both restartResponseAtSignInPage a
 
 
 
-<h2 id="chapter19_2">19.2 Authorizations</h2>
+<h2 id="chapter19_2">20.2 Authorizations</h2>
 <p class="paragraph"/>The authorization support provided by Wicket is built around the concept of authorization strategy which is represented by interface IAuthorizationStrategy (in package org.apache.wicket .authorization):<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</span> <span class="java&#45;keyword">interface</span> IAuthorizationStrategy
 &#123;
   //<span class="java&#45;keyword">interface</span> methods 
@@ -371,7 +374,7 @@ Application class AuthenticatedWebApplic
 
 
 
-<h2 id="chapter19_3">19.3 Using HTTPS protocol</h2>
+<h2 id="chapter19_3">20.3 Using HTTPS protocol</h2>
 <p class="paragraph"/>HTTPS is the standard technology adopted on Internet to create a secure communication channel between web applications and their users.<p class="paragraph"/>In Wicket we can easily protect our pages with HTTPS mounting a special request mapper called HttpsMapper and using annotation RequireHttps with those pages we want to serve over this protocol. Both these two entities are in package org.apache.wicket.protocol.https.<p class="paragraph"/>HttpsMapper wraps an existing mapper and redirects incoming requests to HTTPS if the related response must render a page containing annotation RequireHttps. Most of the times the wrapped mapper will be the root one, just like we saw before for CryptoManager in paragraph 8.6.6.<p class="paragraph"/>Another parameter needed to build a HttpsMapper is an instance of class HttpsConfig. This class allows us to specify which ports must be used for HTTPS and HTTP. By default the port numbers used by these two protocols are respectiv
 ely 443 and 80.<p class="paragraph"/>The following code is taken from project HttpsProtocolExample and illustrates how to enable HTTPS  in our applications:<p class="paragraph"/><div class="code"><pre>//Application class code&#8230;
 @Override
 <span class="java&#45;keyword">public</span> void init()&#123;   
@@ -398,7 +401,7 @@ Application class AuthenticatedWebApplic
 &#125;</pre></div>
 
 
-<h2 id="chapter19_4">19.4 Package Resource Guard</h2>
+<h2 id="chapter19_4">20.4 Package Resource Guard</h2>
 <p class="paragraph"/>Wicket internally uses an entity called package resource guard to protect package resources from external access. This entity is an implementation of interface org.apache.wicket.markup.html. IPackageResourceGuard.<p class="paragraph"/>By default Wicket applications use as package resource guard class SecurePackageResource Guard, which allows to access only to the following file extensions (grouped by type):<p class="paragraph"/><table class="wiki-table" cellpadding="0" cellspacing="0" border="0"><tr><th>File</th><th>Extensions</th></tr><tr class="table-odd"><td><strong class="bold">JavaScript files</strong></td><td>.js</td></tr><tr class="table-even"><td><strong class="bold">CSS files</strong></td><td>.css</td></tr><tr class="table-odd"><td><strong class="bold">HTML pages</strong></td><td>.html</td></tr><tr class="table-even"><td><strong class="bold">Textual files</strong></td><td>.txt</td></tr><tr class="table-odd"><td><strong class="bold">Flash files</strong>
 </td><td>.swf</td></tr><tr class="table-even"><td><strong class="bold">Picture files</strong></td><td>.png, .jpg, .jpeg, .gif, .ico, .cur, .bmp, .svg</td></tr><tr class="table-odd"><td><strong class="bold">Web font files</strong></td><td>.eot, .ttf, .woff</td></tr></table><p class="paragraph"/>To modify the set of allowed files formats we can add one or more patterns with method addPattern (String). The rules to write a pattern are the following:
 <ul class="star">
 <li>patterns start with either a "+" or a "-". In the first case the pattern will add one or more file to the set while starting a pattern with a “-” we exclude all the files matching the given pattern. For example pattern “-web.xml” excludes all web.xml files in all directories.</li>
@@ -421,15 +424,15 @@ Application class AuthenticatedWebApplic
 
 
 
-<h2 id="chapter19_5">19.5 Summary</h2>
+<h2 id="chapter19_5">20.5 Summary</h2>
 <p class="paragraph"/> In this chapter we have seen the components and the mechanisms that allow us to implement security policies in our Wicket-based applications. Wicket comes with an out of the box support for both authorization and authentication.<p class="paragraph"/>The central element of authorization mechanism is the interface IAuthorizationStrategy which decouples our components from any detail about security strategy. The implementations of this interface must decide if a user is allowed to instantiate a given page or component and if she/he can perform a given action on it.<p class="paragraph"/>Wicket natively supports role-based authorizations with strategies MetaDataRoleAuthorization Strategy and AnnotationsRoleAuthorizationStrategy. The difference between these two strategies is that the first offers a programmatic approach for role handling while the second promotes a declarative approach using built-in annotations.<p class="paragraph"/>After having explored how Wicke
 t internally implements authentication and authorization, in the last part of the chapter we have learnt how to configure our applications to support HTTPS and how to specify which pages must be served over this protocol.<p class="paragraph"/>In the last paragraph we have seen how Wicket protects package resources with a guard entity that allows us to decide which package resources can be accessed from users.<p class="paragraph"/><p class="paragraph"/>
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter18.html">&lt;&lt; <strong>18</strong><span>Integration with enterprise containers</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter18.html">&lt;&lt; <strong>19</strong><span>Integration with enterprise containers</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>

Modified: wicket/common/site/trunk/_site/guide/guide/chapter2.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter2.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter2.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter2.html Mon Nov 11 22:13:12 2013
@@ -2,7 +2,7 @@
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-    <title>2 Why should I learn Wicket? 6.x</title>
+    <title>3 Why should I learn Wicket? 6.x</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
     <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter1.html">&lt;&lt; <strong>1</strong><span>Introduction</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/howToSource.html">&lt;&lt; <strong>2</strong><span>How to use the example code</span></a></div>
                 
 
                 <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
 
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>2 Why should I learn Wicket? - Reference Documentation</h1>
+                    <h1>3 Why should I learn Wicket? - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,16 +156,16 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_1"><strong>2.1</strong><span>We all like spaghetti :-) ...</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_1"><strong>3.1</strong><span>We all like spaghetti :-) ...</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_2"><strong>2.2</strong><span>Component oriented frameworks - an overview</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_2"><strong>3.2</strong><span>Component oriented frameworks - an overview</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_3"><strong>2.3</strong><span>Benefits of component oriented frameworks for web development</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_3"><strong>3.3</strong><span>Benefits of component oriented frameworks for web development</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_4"><strong>2.4</strong><span>Wicket vs the other component oriented frameworks</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter2_4"><strong>3.4</strong><span>Wicket vs the other component oriented frameworks</span></a>
                     </div>
                     
                 </div>
@@ -170,17 +173,17 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter2">2 Why should I learn Wicket?</h1>
+<h1 id="chapter2">3 Why should I learn Wicket?</h1>
 Software development is a challenging activity and developers must keep their skills up-to-date with new technologies.<p class="paragraph"/>But before starting to learn the last “coolest” framework we should always ask ourself if it is the right tool for us and how it can improve our everyday job.
 Java's ecosystem is already full of many well-known web frameworks, so why should we spend our time learning Wicket?<p class="paragraph"/>This chapter will show you how Wicket is different from other web frameworks you may know and it will explain also how it can improve your life as web developer.
 
 
-<h2 id="chapter2_1">2.1 We all like spaghetti :-) ...</h2>
+<h2 id="chapter2_1">3.1 We all like spaghetti :-) ...</h2>
 ...but we all hate spaghetti code! That's why in the first half of the 2000s we have seen the birth of so many web frameworks. Their mission was to separate our business code from presentation layer (like JSP pages).<p class="paragraph"/>Some of theme (like Struts, Spring MVC, Velocity, etc...) have become widely adopted and they made the MVC pattern very popular among developers.
 However, none of these frameworks offers a real object-oriented (OO) abstraction for web pages and we still have to take care of web-related tasks such as HTTP request/response handling, URLs mapping, storing data into user session and so on.<p class="paragraph"/>The biggest limit of MVC frameworks is that they don't do much to overcome the impedance mismatch between the stateless nature of HTTP protocol and the need of our web applications of handling a (very complex) state.<p class="paragraph"/>To overcome these limits developers have started to adopt a new generation of component oriented web frameworks designed to provide a completely different approach to web development.<p class="paragraph"/>
 
 
-<h2 id="chapter2_2">2.2 Component oriented frameworks - an overview</h2>
+<h2 id="chapter2_2">3.2 Component oriented frameworks - an overview</h2>
 Component oriented frameworks differ from classic web frameworks in that they build a model of requested page on the server side and the HTML sent back to the client is generated according to this model. You can think of the model as if it was an “inverse” JavaScript DOM, meaning that:
 <ol>
 <li>is built on server-side</li>
@@ -191,7 +194,7 @@ Since pages are class instances they liv
 This approach is very similar to what GUI frameworks (like Swing or SWT) do with desktop windows and their components. Wicket and the other component oriented frameworks bring to web development the same kind of abstraction that GUI frameworks offer when we build a desktop application. Most of those kind of frameworks hide the details of the HTTP protocol and naturally solve the problem of its stateless nature.<p class="paragraph"/>
 
 
-<h2 id="chapter2_3">2.3 Benefits of component oriented frameworks for web development</h2>
+<h2 id="chapter2_3">3.3 Benefits of component oriented frameworks for web development</h2>
 At this point some people may still wonder why OOP is so important also for web development and what benefits it can bring to developers.
 Let's quickly review the main advantages that this paradigm can offer us:
 <ul class="star">
@@ -201,7 +204,7 @@ Let's quickly review the main advantages
 </ul><p class="paragraph"/>
 
 
-<h2 id="chapter2_4">2.4 Wicket vs the other component oriented frameworks</h2>
+<h2 id="chapter2_4">3.4 Wicket vs the other component oriented frameworks</h2>
 Wicket is not the only component oriented framework available in the Java ecosystem. Among its competitors we can find GWT (from Google), JSF (from Oracle), Vaadin (from Vaadin Ltd.), etc&#8230; Even if Wicket and all those other frameworks have their pros and cons, there are good reasons to prefer Wicket over them:
 <ul class="star">
 <li><strong class="bold">Wicket is 100% open source</strong>: Wicket is a top Apache project and it doesn't depend on any private company. You don't have to worry about future licensing changes, Wicket will always be released under Apache license 2.0 and freely available.</li>
@@ -214,9 +217,9 @@ Wicket is not the only component oriente
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter1.html">&lt;&lt; <strong>1</strong><span>Introduction</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/howToSource.html">&lt;&lt; <strong>2</strong><span>How to use the example code</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>

Modified: wicket/common/site/trunk/_site/guide/guide/chapter20.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter20.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter20.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter20.html Mon Nov 11 22:13:12 2013
@@ -2,7 +2,7 @@
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-    <title>20 Test Driven Development with Wicket 6.x</title>
+    <title>21 Test Driven Development with Wicket 6.x</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
     <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter19.html">&lt;&lt; <strong>19</strong><span>Security with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter19.html">&lt;&lt; <strong>20</strong><span>Security with Wicket</span></a></div>
                 
 
                 <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
 
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>20 Test Driven Development with Wicket - Reference Documentation</h1>
+                    <h1>21 Test Driven Development with Wicket - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,16 +156,16 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_1"><strong>20.1</strong><span>Utility class WicketTester</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_1"><strong>21.1</strong><span>Utility class WicketTester</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_2"><strong>20.2</strong><span>Testing Wicket forms</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_2"><strong>21.2</strong><span>Testing Wicket forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_3"><strong>20.3</strong><span>Testing markup with TagTester</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_3"><strong>21.3</strong><span>Testing markup with TagTester</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_4"><strong>20.4</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter20_4"><strong>21.4</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -170,11 +173,11 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter20">20 Test Driven Development with Wicket</h1>
+<h1 id="chapter20">21 Test Driven Development with Wicket</h1>
 <a href="http://en.wikipedia.org/wiki/Test-driven_development" target="blank">Test Driven Development</a> has become a crucial activity for every modern development methodology. This chapter will cover the built-in support for testing provided by Wicket with its rich set of helper and mock classes that allows us to test our components and our applications in isolation (i.e without the need for a servlet container) using JUnit, the de facto standard for Java unit testing.<p class="paragraph"/>In this chapter we will see how to write unit tests for our applications and components and we will learn how to use helper classes to simulate user navigation and write acceptance tests without the need of any testing framework other than JUnit.<p class="paragraph"/>The JUnit version used in this chapter is 4.x.   
 
 
-<h2 id="chapter20_1">20.1 Utility class WicketTester</h2>
+<h2 id="chapter20_1">21.1 Utility class WicketTester</h2>
 <p class="paragraph"/>A good way to start getting confident with Wicket unit testing support is looking at the test case class TestHomePage that is automatically generated by Maven when we use Wicket archetype to create a new project:<p class="paragraph"/><img border="0" class="center" src="../img/mvn-wicket-archetype.png"></img><p class="paragraph"/>Here is the content of TestHomePage:<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</span> class TestHomePage&#123;
 	<span class="java&#45;keyword">private</span> WicketTester tester;<p class="paragraph"/>	@Before
 	<span class="java&#45;keyword">public</span> void setUp()&#123;
@@ -308,7 +311,7 @@ After a test method has been executed, w
 
 
 
-<h2 id="chapter20_2">20.2 Testing Wicket forms</h2>
+<h2 id="chapter20_2">21.2 Testing Wicket forms</h2>
 <p class="paragraph"/>Wicket provides utility class FormTester that is expressly designed to test Wicket forms. A new FormTester is returned by WicketTester's method newFormTester(String, boolean) which takes in input the page-relative path of the form we want to test and a boolean flag indicating if its form components must be filled with a blank string:<p class="paragraph"/><div class="code"><pre>//&#8230;
 //create a <span class="java&#45;keyword">new</span> form tester without filling its form components with a blank string
 FormTester formTester = tester.newFormTester(<span class="java&#45;quote">"form"</span>, <span class="java&#45;keyword">false</span>);
@@ -362,7 +365,7 @@ formTester.submit(<span class="java&#45;
 &#125;</pre></div>
 
 
-<h2 id="chapter20_3">20.3 Testing markup with TagTester</h2>
+<h2 id="chapter20_3">21.3 Testing markup with TagTester</h2>
 <p class="paragraph"/>If we need to test component markup at a more fine-grained level, we can use class TagTester from package org.apache.wicket.util.tester.<p class="paragraph"/>This test class allows to check if the generated markup contains one or more tags having a given attribute with a given value. TagTester can not be directly instantiated but it comes with three factory methods that return one or more TagTester matching the searching criteria. In the following test case (from project TagTesterExample) we retrieve the first tag of the home page (a &#60;span&#62; tag) having attribute class equal to myClass:<p class="paragraph"/><strong class="bold">HomePage markup:</strong><p class="paragraph"/><div class="code"><pre>&#60;html xmlns:wicket=<span class="java&#45;quote">"http://wicket.apache.org"</span>&#62;
 	&#60;head&#62;
 		&#60;meta charset=<span class="java&#45;quote">"utf&#45;8"</span> /&#62;
@@ -385,15 +388,15 @@ formTester.submit(<span class="java&#45;
 
 
 
-<h2 id="chapter20_4">20.4 Summary</h2>
+<h2 id="chapter20_4">21.4 Summary</h2>
 <p class="paragraph"/>With a component-oriented framework we can test our pages and components as we use to do with any other Java entity. Wicket offers a complete support for writing testing code, offering built-in tools to test nearly all the elements that build up our applications (pages, containers, links, behaviors, etc...).<p class="paragraph"/>The main entity discussed in this chapter has been class WicketTester which can be used to write unit tests and acceptance tests for our application, but we have also seen how to test forms with FormTester and how to inspect markup with TagTester.<p class="paragraph"/>In addition to learning how to use the utility classes provided by Wicket for testing, we have also experienced the innovative approach of Wicket to web testing that allows to test components in isolation without the need of running our tests with a web server and depending only on JUnit as testing framework.<p class="paragraph"/><p class="paragraph"/>
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter19.html">&lt;&lt; <strong>19</strong><span>Security with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter19.html">&lt;&lt; <strong>20</strong><span>Security with Wicket</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>

Modified: wicket/common/site/trunk/_site/guide/guide/chapter21.html
URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/chapter21.html?rev=1540864&r1=1540863&r2=1540864&view=diff
==============================================================================
--- wicket/common/site/trunk/_site/guide/guide/chapter21.html (original)
+++ wicket/common/site/trunk/_site/guide/guide/chapter21.html Mon Nov 11 22:13:12 2013
@@ -2,7 +2,7 @@
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-    <title>21 Test Driven Development with Wicket and Spring 6.x</title>
+    <title>22 Test Driven Development with Wicket and Spring 6.x</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
     <link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
@@ -27,79 +27,82 @@ function addJsClass() {
                     <div class="toc-item" style="margin-left:0"><a href="../guide/chapter1.html"><strong>1</strong><span>Introduction</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>2</strong><span>Why should I learn Wicket?</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/howToSource.html"><strong>2</strong><span>How to use the example code</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>3</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter2.html"><strong>3</strong><span>Why should I learn Wicket?</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>4</strong><span>Wicket as page layout manager</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter3.html"><strong>4</strong><span>Wicket says &ldquo;Hello world!&rdquo;</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>5</strong><span>Keeping control over HTML</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter4.html"><strong>5</strong><span>Wicket as page layout manager</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>6</strong><span>Components lifecycle</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter5.html"><strong>6</strong><span>Keeping control over HTML</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>7</strong><span>Page versioning and caching</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter6.html"><strong>7</strong><span>Components lifecycle</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>8</strong><span>Under the hood of the request processing</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter7.html"><strong>8</strong><span>Page versioning and caching</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>9</strong><span>Wicket Links and URL generation</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter8.html"><strong>9</strong><span>Under the hood of the request processing</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>10</strong><span>Wicket models and forms</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter9.html"><strong>10</strong><span>Wicket Links and URL generation</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>11</strong><span>Wicket forms in detail</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter10.html"><strong>11</strong><span>Wicket models and forms</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>12</strong><span>Displaying multiple items with repeaters</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter11.html"><strong>12</strong><span>Wicket forms in detail</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>13</strong><span>Internationalization with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter12.html"><strong>13</strong><span>Displaying multiple items with repeaters</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>14</strong><span>Resource management with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter13.html"><strong>14</strong><span>Internationalization with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>15</strong><span>An example of integration with JavaScript</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter14.html"><strong>15</strong><span>Resource management with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>16</strong><span>Wicket advanced topics</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter15.html"><strong>16</strong><span>An example of integration with JavaScript</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>17</strong><span>Working with AJAX</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter16.html"><strong>17</strong><span>Wicket advanced topics</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>18</strong><span>Integration with enterprise containers</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter17.html"><strong>18</strong><span>Working with AJAX</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>19</strong><span>Security with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter18.html"><strong>19</strong><span>Integration with enterprise containers</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>20</strong><span>Test Driven Development with Wicket</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter19.html"><strong>20</strong><span>Security with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>21</strong><span>Test Driven Development with Wicket and Spring</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter20.html"><strong>21</strong><span>Test Driven Development with Wicket</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter21.html"><strong>22</strong><span>Test Driven Development with Wicket and Spring</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>23</strong><span>Working with Maven (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>24</strong><span>Project WicketStuff (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter23.html"><strong>24</strong><span>Working with Maven (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>25</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter24.html"><strong>25</strong><span>Project WicketStuff (Appendix)</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>26</strong><span>Contributing to this guide (Appendix)</span></a>
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter25.html"><strong>26</strong><span>Lost In Redirection With Apache Wicket (Appendix)</span></a>
+                    </div>
+                    
+                    <div class="toc-item" style="margin-left:0"><a href="../guide/chapter26.html"><strong>27</strong><span>Contributing to this guide (Appendix)</span></a>
                     </div>
                     
                 </div>
@@ -129,18 +132,18 @@ function addJsClass() {
             <div id="main" class="corner-all">
 
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter20.html">&lt;&lt; <strong>20</strong><span>Test Driven Development with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter20.html">&lt;&lt; <strong>21</strong><span>Test Driven Development with Wicket</span></a></div>
                 
 
                 <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
 
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span> >></a></div>
                 
 
 
                 <div class="project">
-                    <h1>21 Test Driven Development with Wicket and Spring - Reference Documentation</h1>
+                    <h1>22 Test Driven Development with Wicket and Spring - Reference Documentation</h1>
 
                     <p><strong>Authors:</strong> Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș</p>
 
@@ -153,13 +156,13 @@ function addJsClass() {
                 <div id="table-of-content">
                     <h2>Table of Contents</h2>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_1"><strong>21.1</strong><span>Configuration of the runtime environment</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_1"><strong>22.1</strong><span>Configuration of the runtime environment</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_2"><strong>21.2</strong><span>Configuration of the JUnit based integration test environment</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_2"><strong>22.2</strong><span>Configuration of the JUnit based integration test environment</span></a>
                     </div>
                     
-                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_3"><strong>21.3</strong><span>Summary</span></a>
+                    <div class="toc-item" style="margin-left:0px"><a href="#chapter21_3"><strong>22.3</strong><span>Summary</span></a>
                     </div>
                     
                 </div>
@@ -167,12 +170,12 @@ function addJsClass() {
 
                 
 
-<h1 id="chapter21">21 Test Driven Development with Wicket and Spring</h1>
+<h1 id="chapter21">22 Test Driven Development with Wicket and Spring</h1>
 Since the development of many web applications is mostly based on the Spring framework for dependency injection and application configuration in general, it's especially important to get these two frameworks running together smoothly not only when deployed on a running server instance itself but rather during the execution of JUnit based integration tests as well. Thanks to the <code>WicketTester</code> API provided by the Wicket framework itself, one can easily build high-quality web applications while practicing test driven development and providing a decent set of unit and integration tests to be executed with each build. As already mentioned previously, integration and configuration of our web applications is based on a lightweight Spring container meaning that the integration of Spring's <code>ApplicationContext</code> and a WicketTester API is essential to get our integration tests running. In order to explain how to achieve that integration in an easy and elegant fashion i
 n your integration test environment, we'll first take a look at a configuration of these 2 framework beauties in a runtime environment.
 
 
 
-<h2 id="chapter21_1">21.1 Configuration of the runtime environment</h2>
+<h2 id="chapter21_1">22.1 Configuration of the runtime environment</h2>
 <p class="paragraph"/>In order to get the Wicket framework up to speed when your server is up and running, you usually configure a <code>WicketFilter</code> instance in your web application deployment descriptor file (<code>web.xml</code>) while passing it a single init parameter called <code>applicationClassName</code> that points to your main implementation class extending <code>org.apache.wicket.protocol.http.WebApplication</code> where all of your application-wide settings and initialization requirements are dealt with:<p class="paragraph"/><div class="code"><pre><span class="xml&#45;tag">&#60;filter&#62;</span>
     <span class="xml&#45;tag">&#60;filter&#45;name&#62;</span>wicketfilter<span class="xml&#45;tag">&#60;/filter&#45;name&#62;</span>
     <span class="xml&#45;tag">&#60;filter&#45;class&#62;</span>org.apache.wicket.protocol.http.WicketFilter<span class="xml&#45;tag">&#60;/filter&#45;class&#62;</span>
@@ -220,7 +223,7 @@ Since the development of many web applic
     &#125;<p class="paragraph"/>&#125;</pre></div><p class="paragraph"/>SpringComponentInjector provided by the Wicket framework enables you to get dependencies from the ApplicationContext directly injected into your Wicket components by simply annotating these with the according <code>&#64;SpringBean</code> annotation.
 
 
-<h2 id="chapter21_2">21.2 Configuration of the JUnit based integration test environment</h2>
+<h2 id="chapter21_2">22.2 Configuration of the JUnit based integration test environment</h2>
 <p class="paragraph"/>One of the main features of Apache Wicket framework is the ability to easily write and run plain unit tests for your Pages and all other kinds of Components that even include the verification of the rendering process itself by using JUnit framework and the WicketTester API only. When using Spring framework for application configuration together with Wicket, as we do, you can even use the same tools to easily write and run full blown integration tests for your web application as well. All you have to do is use <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/testing.html#testcontext-framework" target="blank">Spring's TestContext</a> framework additionally to configure and run your JUnit based integration tests. The Spring Framework provides a set of Spring specific annotations that you can use in your integration tests in conjunction with the TestContext framework itself in order to easily configure an according Applicati
 onContext instance for your tests as well as for appropriate transaction management before, during and after your test execution. Following code snippet represents a simple JUnit 4 based test case using Spring's specific annotations in order to initialize an ApplicationContext instance prior to executing the test itself:<p class="paragraph"/><div class="code"><pre>@RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(locations = &#123;<span class="java&#45;quote">"classpath:WEB&#45;INF/applicationContext.xml"</span>&#125;)
 @TransactionConfiguration(transactionManager = <span class="java&#45;quote">"txManager"</span>, defaultRollback = <span class="java&#45;keyword">false</span>)
@@ -285,15 +288,15 @@ Since the development of many web applic
 
 
 
-<h2 id="chapter21_3">21.3 Summary</h2>
+<h2 id="chapter21_3">22.3 Summary</h2>
 <p class="paragraph"/>With the configuration outlined above, no additional modifications are required to the test itself. It's going to turn green now. This way you can use exactly the same Spring context configuration that you'd use in your runtime environment for running your JUnit based integration tests as well.
 
 
                 <div style="clear:both;margin-top:15px;"></div>
                 
-                    <div class="toc-item prev-left"><a href="../guide/chapter20.html">&lt;&lt; <strong>20</strong><span>Test Driven Development with Wicket</span></a></div>
+                    <div class="toc-item prev-left"><a href="../guide/chapter20.html">&lt;&lt; <strong>21</strong><span>Test Driven Development with Wicket</span></a></div>
                 
-                    <div class="toc-item next-right"><a href="../guide/chapter22.html"><strong>22</strong><span>Wicket Best Practices</span> >></a></div>
+                    <div class="toc-item next-right"><a href="../guide/chapter22.html"><strong>23</strong><span>Wicket Best Practices</span> >></a></div>
                 
                 <div style="clear:both"></div>
             </div>