Repository: wicket-site Updated Branches: refs/heads/asf-site 3708504ee -> 11c9ba777
Servlet 3.x with Spring Framework example - Generated files Project: http://git-wip-us.apache.org/repos/asf/wicket-site/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket-site/commit/11c9ba77 Tree: http://git-wip-us.apache.org/repos/asf/wicket-site/tree/11c9ba77 Diff: http://git-wip-us.apache.org/repos/asf/wicket-site/diff/11c9ba77 Branch: refs/heads/asf-site Commit: 11c9ba7773035eef9769043d1122428d0e19be6c Parents: 3708504 Author: Tobias Soloschenko <[email protected]> Authored: Mon Feb 27 06:28:18 2017 +0100 Committer: Tobias Soloschenko <[email protected]> Committed: Mon Feb 27 06:30:49 2017 +0100 ---------------------------------------------------------------------- content/atom.xml | 2 +- content/learn/examples/servlet3x.html | 14 ++++++++------ content/start/quickstart.html | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket-site/blob/11c9ba77/content/atom.xml ---------------------------------------------------------------------- diff --git a/content/atom.xml b/content/atom.xml index 038903d..52f4870 100644 --- a/content/atom.xml +++ b/content/atom.xml @@ -3,7 +3,7 @@ <title>Apache Wicket</title> <link href="http://wicket.apache.org/atom.xml" rel="self"/> <link href="http://wicket.apache.org/"/> - <updated>2017-02-24T11:37:16+01:00</updated> + <updated>2017-02-27T06:29:22+01:00</updated> <id>http://wicket.apache.org/</id> <author> <name>Apache Wicket</name> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/11c9ba77/content/learn/examples/servlet3x.html ---------------------------------------------------------------------- diff --git a/content/learn/examples/servlet3x.html b/content/learn/examples/servlet3x.html index ab27bfc..a1b9f50 100644 --- a/content/learn/examples/servlet3x.html +++ b/content/learn/examples/servlet3x.html @@ -72,17 +72,19 @@ those Spring components are initialized with specific annotations like @Componen example. You have to place them into the scanned package or in sub packages. (com.my.package in this case)</p> <figure class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">import</span> <span class="nn">javax.servlet.annotation.WebListener</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.springframework.web.context.ContextLoaderListener</span><span class="o">;</span> +<span class="kn">import</span> <span class="nn">org.springframework.web.context.WebApplicationContext</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.springframework.web.context.support.AnnotationConfigWebApplicationContext</span><span class="o">;</span> <span class="nd">@WebListener</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyContextLoaderListener</span> <span class="kd">extends</span> <span class="n">ContextLoaderListener</span> <span class="o">{</span> - <span class="kd">private</span> <span class="kd">static</span> <span class="n">AnnotationConfigWebApplicationContext</span> <span class="n">context</span><span class="o">;</span> - <span class="kd">static</span> <span class="o">{</span> - <span class="n">context</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AnnotationConfigWebApplicationContext</span><span class="o">();</span> + <span class="kd">public</span> <span class="n">MyContextLoaderListener</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">super</span><span class="o">(</span><span class="n">getWebApplicationContext</span><span class="o">());</span> + <span class="o">}</span> + <span class="kd">private</span> <span class="kd">static</span> <span class="n">WebApplicationContext</span> <span class="n">getWebApplicationContext</span><span class="o">()</span> <span class="o">{</span> + <span class="n">AnnotationConfigWebApplicationContext</span> <span class="n">context</span> + <span class="o">=</span> <span class="k">new</span> <span class="n">AnnotationConfigWebApplicationContext</span><span class="o">();</span> <span class="n">context</span><span class="o">.</span><span class="na">scan</span><span class="o">(</span><span class="s">"com.my.package"</span><span class="o">);</span> <span class="n">context</span><span class="o">.</span><span class="na">refresh</span><span class="o">();</span> - <span class="o">}</span> - <span class="kd">public</span> <span class="n">MyContextLoaderListener</span><span class="o">()</span> <span class="o">{</span> - <span class="kd">super</span><span class="o">(</span><span class="n">context</span><span class="o">);</span> + <span class="k">return</span> <span class="n">context</span><span class="o">;</span> <span class="o">}</span> <span class="o">}</span></code></pre></figure> <h3 id="myrequestcontextlistenerjava">MyRequestContextListener.java</h3> http://git-wip-us.apache.org/repos/asf/wicket-site/blob/11c9ba77/content/start/quickstart.html ---------------------------------------------------------------------- diff --git a/content/start/quickstart.html b/content/start/quickstart.html index 90168e4..1205fd5 100644 --- a/content/start/quickstart.html +++ b/content/start/quickstart.html @@ -153,9 +153,9 @@ generated (e.g. for Eclipse users this would be your workspace folder). Paste the command line into your terminal window and press «enter» to execute the command.</p> <p>You can create your quickstart interactively too with the following Maven command:</p> -<div class="highlighter-rouge"><pre class="highlight"><code> mvn archetype:generate -DarchetypeCatalog<span class="o">=</span>http://wicket.apache.org -</code></pre> -</div> +<p><code class="highlighter-rouge">shell + mvn archetype:generate -DarchetypeCatalog=http://wicket.apache.org +</code></p> <h4 id="result-of-the-maven-command">Result of the Maven command</h4> <p>Executing the Maven command line will result the following directory structure:</p>
