You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wookie.apache.org by bu...@apache.org on 2012/11/27 10:54:47 UTC

svn commit: r839743 [4/6] - in /websites/staging/wookie/trunk/content: ./ css/ docs/ docs/developer/ docs/developer/features/ docs/releases/ docs/tutorial/ docs/tutorial/lib/ docs/tutorial/lib/s5/ docs/tutorial/lib/s5/ui/ docs/tutorial/lib/s5/ui/defaul...

Added: websites/staging/wookie/trunk/content/docs/developer/running.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/developer/running.html (added)
+++ websites/staging/wookie/trunk/content/docs/developer/running.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,333 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Running Wookie</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Running Wookie</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <p>This page documents the various ways of running Wookie. See also the <a href="../admin.html">Server Administration</a> documentation for more details on initial server configuration such as security settings.</p>
+<h2 id="running-wookie-in-standalone-mode">Running Wookie in "standalone" mode</h2>
+<p>The quickest way to run Wookie is in "standalone" mode; in this mode Wookie uses a local database and embedded server. This is a good way to experiment with Wookie in development.</p>
+<p>To run Wookie in standalone mode:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT_HOME_DIRECTORY</span>
+<span class="n">ant</span> <span class="n">run</span>
+</pre></div>
+
+
+<p>The first time you run wookie (or compile it) any required libraries will be downloaded, this can take some time and requires a network connection.</p>
+<p>Note that by default, wookie will clean the database each time it is run, this ensures that your development environment starts in a consistent state. However, any modifications you have made to the database during previous runs will be lost.</p>
+<p>To run the development server without cleaning the database you need to set initDB=false. See the next section for more details.</p>
+<p>Once the server is running go to http://localhost:8080/wookie</p>
+<p>If you want to start with a completely clean build then use:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT_HOME_DIRECTORY</span>
+<span class="n">ant</span> <span class="n">clean</span><span class="o">-</span><span class="n">build</span> <span class="n">run</span>
+</pre></div>
+
+
+<p>Note that running in standalone mode uses a number of defaults, including a default admin user name and password, and a default API key, all of 
+which should be changed on a server that is publicly available; see the <a href="../admin.html">Server Administration</a> guide for more details.</p>
+<h3 id="running-options">Running options</h3>
+<p>To set run mode options you can either add properties to the local.build.properties file or you can pass properties in via the command line using -Drun.args="<property_name>=<property_value> <property_name>=<property_value>". For example:</p>
+<div class="codehilite"><pre><span class="o">-</span><span class="n">Drun</span><span class="o">.</span><span class="n">args</span><span class="o">=</span><span class="s">&quot;port=8080 initDB=false&quot;</span>
+</pre></div>
+
+
+<p>Available properties are:</p>
+<table class="confluenceTable"><tbody>
+<tr>
+<th class="confluenceTh"> Property </th>
+<th class="confluenceTh"> Values </th>
+<th class="confluenceTh"> Description </th>
+<th class="confluenceTh"> Default </th>
+</tr>
+<tr>
+<td class="confluenceTd"> initDB </td>
+<td class="confluenceTd"> True or False </td>
+<td class="confluenceTd"> Initialise the DB to a default configuration </td>
+<td class="confluenceTd"> True </td>
+</tr>
+<tr>
+<td class="confluenceTd"> port </td>
+<td class="confluenceTd"> Integer </td>
+<td class="confluenceTd"> Set the port on which the server is to run </td>
+<td class="confluenceTd"> 8888 </td>
+</tr>
+</tbody></table>
+
+<h2 id="running-wookie-with-tomcat-and-mysql">Running Wookie with Tomcat and MySQL</h2>
+<p>The following will compile and run the server in Tomcat with a specified RDBMS using JPA persistence. The database schema can be defined and populated on launch, however you must have previously done the following:</p>
+<ol>
+<li>Obtained a JDBC driver jar file for the database,</li>
+<li>created an empty database for Wookie's persistent storage, and</li>
+<li>have valid database credentials to access it.</li>
+</ol>
+<p>Make the following changes to configure build.properties, (substituting CATALINA_HOME with the absolute or relative path to Tomcat's installation directory and specifying the database driver, url, type and credentials connection information):</p>
+<div class="codehilite"><pre><span class="n">widget</span><span class="o">.</span><span class="n">deploy</span><span class="o">.</span><span class="n">dir</span><span class="o">=</span><span class="n">CATALINA_HOME</span><span class="sr">/webapps/</span><span class="n">wookie</span><span class="o">/</span><span class="n">deploy</span>
+<span class="n">servletEngine</span><span class="o">.</span><span class="n">webapp</span><span class="o">.</span><span class="n">dir</span><span class="o">=</span><span class="n">CATALINA_HOME</span><span class="o">/</span><span class="n">webapps</span>
+<span class="n">servletEngine</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">lib</span><span class="o">.</span><span class="n">dir</span><span class="o">=</span><span class="n">CATALINA_HOME</span><span class="o">/</span><span class="n">lib</span>
+<span class="n">servletEngine</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">conf</span><span class="o">.</span><span class="n">dir</span><span class="o">=</span><span class="n">CATALINA_HOME</span><span class="sr">/conf/</span><span class="n">Catalina</span><span class="o">/</span><span class="n">localhost</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">persistence</span><span class="o">.</span><span class="n">manager</span><span class="o">.</span><span class="n">type</span><span class="o">=</span><span class="n">jpa</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">user</span><span class="o">=</span><span class="n">java</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">password</span><span class="o">=</span><span class="n">java</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">driver</span><span class="o">=</span><span class="n">com</span><span class="o">.</span><span class="n">mysql</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span class="n">Driver</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">uri</span><span class="o">=</span><span class="n">jdbc:mysql:</span><span class="sr">//</span><span class="n">localhost:3306</span><span class="o">/</span><span class="n">widgetdb</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">type</span><span class="o">=</span><span class="n">mysql</span>
+<span class="n">jdbc</span><span class="o">.</span><span class="n">driver</span><span class="o">.</span><span class="n">path</span><span class="o">=../</span><span class="n">mysql</span><span class="o">-</span><span class="n">connector</span><span class="o">-</span><span class="n">java</span><span class="o">-</span><span class="mf">5.1.7</span><span class="o">.</span><span class="n">jar</span>
+</pre></div>
+
+
+<p>The wookie.db.type setting can accept the following values: db2, derby, hsqldb, 
+mssql, mysql, mysql5, oracle, oracle9, oracle10, postgresql, and sybase. The 
+jdbc.driver.path setting can be absolute or relative file path to the driver 
+jar archive.</p>
+<p>To ensure the configuration changes are propagated into the Wookie build artifacts, perform a full clean build after changing build.properties:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT_HOME_DIRECTORY</span>
+<span class="n">ant</span> <span class="n">clean</span><span class="o">-</span><span class="n">build</span> <span class="n">deploy</span><span class="o">-</span><span class="n">webapp</span>
+</pre></div>
+
+
+<p>To force Wookie to define or reset the database schema on the first start, use the following commands to start the Tomcat server:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT_HOME_DIRECTORY</span>
+<span class="n">export</span> <span class="n">CATALINA_OPTS</span><span class="o">=</span><span class="s">&quot;-Dwidget.persistence.manager.initstore=true&quot;</span>
+<span class="n">CATALINA_HOME</span><span class="sr">/bin/s</span><span class="n">tartup</span><span class="o">.</span><span class="n">sh</span>
+</pre></div>
+
+
+<p>To shutdown the Wookie Tomcat server and clear the initialization flag:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT_HOME_DIRECTORY</span>
+<span class="n">CATALINA_HOME</span><span class="sr">/bin/s</span><span class="n">hutdown</span><span class="o">.</span><span class="n">sh</span>
+<span class="n">export</span> <span class="n">CATALINA_OPTS</span><span class="o">=</span>
+</pre></div>
+
+
+<p>There are also SQL scripts for all of the valid database configurations built as part of Wookie that can be used to initialize the database schema manually if desired. These are located here:</p>
+<div class="codehilite"><pre><span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">db2</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">derby</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">hsqldb</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">mssql</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">mysql5</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">mysql</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">oracle10</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">oracle9</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">oracle</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">postgresql</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+<span class="n">build</span><span class="sr">/classes/o</span><span class="n">rg</span><span class="sr">/apache/</span><span class="n">wookie</span><span class="sr">/beans/</span><span class="n">jpa</span><span class="o">/</span><span class="n">sybase</span><span class="o">-</span><span class="n">wookie</span><span class="o">-</span><span class="n">schema</span><span class="o">.</span><span class="n">sql</span>
+</pre></div>
+
+
+<p>The Wookie server will populate the newly initialized database with seed data to complete the process when started.</p>
+<p>You will need to create a user with the role "widgetadmin" in your tomcat installation. For example, add the following to tomcat-users.xml:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">role</span> <span class="n">rolename</span><span class="o">=</span><span class="s">&quot;widgetadmin&quot;</span><span class="sr">/&gt;&lt;user username=&quot;java&quot; password=&quot;java&quot; roles=&quot;widgetadmin&quot;/</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>(Where "java" is your own admin username and password. See also the <a href="../admin.html">server administration</a> guide for other security information)</p>
+<p>If you have previously used Wookie in standalone deployment, to ensure the right scripts are included in the build you need to run:</p>
+<div class="codehilite"><pre><span class="n">ant</span> <span class="n">clean</span><span class="o">-</span><span class="n">build</span>
+</pre></div>
+
+
+<p>Then to build and deploy the webapp, run:</p>
+<div class="codehilite"><pre><span class="n">ant</span> <span class="n">deploy</span><span class="o">-</span><span class="n">webapp</span>
+</pre></div>
+
+
+<p>You can then start Tomcat as usual.</p>
+<p>To access the administration menu (http://localhost:8080/wookie/admin) use the username 'java' and password 'java'.</p>
+<p>If you want to start with a completely clean build then use:</p>
+<div class="codehilite"><pre><span class="n">ant</span> <span class="n">clean</span><span class="o">-</span><span class="n">build</span> <span class="n">deploy</span><span class="o">-</span><span class="n">webapp</span>
+</pre></div>
+
+
+<h2 id="running-wookie-with-a-security-manager">Running Wookie with a security manager</h2>
+<p><strong><em>NOTE: This section was written before moving from Hibernate to OpenJPA/JCR and so some of these instructions may no longer be correct.</em></strong></p>
+<p>If you are running Wookie with a security manager you will have to grant some permissions to get Wookie running properly. Otherwise you are likely to run into this of a similar error:</p>
+<div class="codehilite"><pre><span class="err">SEVERE:</span> <span class="err">Exception</span> <span class="err">sending</span> <span class="err">context</span> <span class="err">initialized</span> <span class="err">event</span> <span class="err">to</span> <span class="err">listener</span> <span class="err">instance</span> <span class="err">of</span> <span class="kd">class</span> <span class="nc">org.apache.wookie.server.ContextListener</span>
+<span class="nc">java.security.AccessControlException</span><span class="err">:</span> <span class="err">access</span> <span class="err">denied</span> 
+<span class="err">(java.util.PropertyPermission</span> <span class="err">user.dir</span> <span class="err">read)</span> <span class="err">at</span> <span class="err">...</span>
+</pre></div>
+
+
+<p>If you can't turn off the security manager but don't really care about it, you can consider to replace to contents of the policy file (in Tomcat this is typically $TOMCAT_HOME/conf/catalina.policy, Ubuntu users will find the policy files in /etc/tomcat6/policy.d/) with the grant all statement:</p>
+<div class="codehilite"><pre><span class="n">grant</span> <span class="p">{</span>
+  <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">security</span><span class="o">.</span><span class="n">AllPermission</span><span class="p">;</span>
+<span class="p">};</span>
+</pre></div>
+
+
+<p>This is not a recommended way of working for a production environment, because it effectively means turning off security alltogether.</p>
+<p>Another option is to properly configure the security policy file. Below is a list of permissions that Wookie needs. Most of these are for Hibernate that needs to generate 'enhanced' classes at runtime.</p>
+<div class="codehilite"><pre><span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">PropertyPermission</span> <span class="n">user</span><span class="o">.</span><span class="n">dir</span> <span class="nb">read</span><span class="p">)</span>
+<span class="n">grant</span> <span class="p">{</span>
+  <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">PropertyPermission</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="s">&quot;read,write&quot;</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">FilePermission</span> <span class="n">TOMCAT_HOME</span><span class="o">\</span><span class="n">bin</span><span class="o">\</span><span class="nb">local</span><span class="o">.</span><span class="n">widgetserver</span><span class="o">.</span><span class="n">properties</span> <span class="nb">read</span><span class="p">)</span>
+<span class="n">grant</span> <span class="p">{</span>
+  <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">FilePermission</span> <span class="s">&quot;&lt;&lt;ALL FILES&gt;&gt;&quot;</span><span class="p">,</span> <span class="s">&quot;read, write&quot;</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">net</span><span class="o">.</span><span class="n">SocketPermission</span> <span class="n">localhost</span> <span class="n">resolve</span><span class="p">)</span>
+<span class="n">grant</span>  <span class="p">{</span>
+   <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">net</span><span class="o">.</span><span class="n">SocketPermission</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="s">&quot;resolve,connect&quot;</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="n">accessClassInPackage</span><span class="o">.</span><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">catalina</span><span class="p">)</span>
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="n">accessDeclaredMembers</span><span class="p">)</span>
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="n">getProtectionDomain</span><span class="p">)</span>
+<span class="n">grant</span> <span class="p">{</span>
+    <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="s">&quot;accessClassInPackage.org.apache.catalina&quot;</span><span class="p">;</span>
+<span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="s">&quot;accessDeclaredMembers&quot;</span><span class="p">;</span>
+<span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">RuntimePermission</span> <span class="s">&quot;getProtectionDomain&quot;</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="sr">//</span> <span class="n">fixes</span> <span class="n">access</span> <span class="n">denied</span> <span class="p">(</span><span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">reflect</span><span class="o">.</span><span class="n">ReflectPermission</span> <span class="n">suppressAccessChecks</span><span class="p">)</span>
+<span class="n">grant</span>  <span class="p">{</span>
+   <span class="n">permission</span> <span class="n">java</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">reflect</span><span class="o">.</span><span class="n">ReflectPermission</span> <span class="s">&quot;suppressAccessChecks&quot;</span><span class="p">;</span>
+<span class="p">};</span>
+</pre></div>
+
+
+<p>Note that some of these fixes are still not very strict, which means that if you
+are really concerned to limit permissions as much as possible, you need to define
+stricter rules, but it's a start and should get your Wookie instance up-and-running.</p>
+<p>For more information how to do this in Tomcat, see the <a href="http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html">Tomcat Security Manager HOW-TO</a></p>
+<h2 id="running-wookie-using-embedded-jackrabbit-jcr">Running Wookie using embedded Jackrabbit JCR</h2>
+<p>Wookie by default uses OpenJPA for persistence, however you can also use JCR. This is not part of the standard build and distribution of Wookie, so first you need to build the module, then include it in Wookie's dependencies.</p>
+<p>The first step is to build and publish the core Wookie server code, as the JCR module build process depends on being able to find it using Ivy. </p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">PROJECT</span><span class="o">-</span><span class="n">HOME</span><span class="o">-</span><span class="n">DIRECTORY</span>
+<span class="n">ant</span> <span class="n">publish</span><span class="o">-</span><span class="nb">local</span>
+</pre></div>
+
+
+<p>Next you need to build and publish the JCR module:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">modules</span><span class="o">/</span><span class="n">jcr</span>
+<span class="n">ant</span> <span class="n">publish</span><span class="o">-</span><span class="nb">local</span>
+</pre></div>
+
+
+<p>Uncomment the lines in the main ivy.xml file to require the JCR jar when building Wookie, and the next time you build Wookie the wookie-jcr jar will be included, enabling you to switch to JCR persistence.</p>
+<p>The following property is used to switch the standalone or Tomcat deployed servers to utilize JCR for persistence via an embedded JCR instance:</p>
+<div class="codehilite"><pre><span class="n">wookie</span><span class="o">.</span><span class="n">persistence</span><span class="o">.</span><span class="n">manager</span><span class="o">.</span><span class="n">type</span><span class="o">=</span><span class="n">jcr</span>
+</pre></div>
+
+
+<p>Additional properties must be configured to specify the desired JCR root node path and credentials for tomcat deployments:</p>
+<div class="codehilite"><pre><span class="n">wookie</span><span class="o">.</span><span class="n">repository</span><span class="o">.</span><span class="n">user</span><span class="o">=</span><span class="n">java</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">repository</span><span class="o">.</span><span class="n">password</span><span class="o">=</span><span class="n">java</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">repository</span><span class="o">.</span><span class="n">rootpath</span><span class="o">=/</span><span class="n">wookie</span>
+<span class="n">wookie</span><span class="o">.</span><span class="n">repository</span><span class="o">.</span><span class="n">workspace</span><span class="o">=</span><span class="n">default</span>
+</pre></div>
+
+
+<p>These replace the wookie.db.* and jdbc.drive.path settings above, but otherwise the instructions apply for the JCR configuration.</p>
+<h2 id="running-wookie-with-other-configurations">Running Wookie with other configurations</h2>
+<p>Other configurations of Wookie can also be run; the main requirements are a servlet container and a database.</p>
+<p>Database connections can be set up using either JPA (Java Persistence API) or JCR; the configuration details are set in build.properties. Additional configuration for advanced use can be found in org.apache.wookie.beans.jpa/peristence.properties. The database schema and mappings is located in etc/ddl-schema.</p>
+<p>The deploy-webapp task can be used to deploy Wookie to any servlet container application.</p>
+<h2 id="running-wookie-in-a-virtual-host-configuration">Running Wookie in a virtual host configuration</h2>
+<p>To run Wookie using a virtual host configuration - for example, to run Wookie on http://localhost:8080/wookie, 
+but with the external URL http://my.wookie.org/wookie - you need to set the following properties in widgetserver.properties or local.widgetserver.properties:</p>
+<div class="codehilite"><pre> <span class="n">widget</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">scheme</span><span class="o">=</span><span class="n">http</span>
+ <span class="n">widget</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">hostname</span><span class="o">=</span><span class="k">my</span><span class="o">.</span><span class="n">wookie</span><span class="o">.</span><span class="n">org</span>
+ <span class="n">widget</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">port</span><span class="o">=</span><span class="mi">80</span>
+</pre></div>
+
+
+<p>Note you need to set your proxy configuration separately:</p>
+<div class="codehilite"><pre> <span class="n">widget</span><span class="o">.</span><span class="n">proxy</span><span class="o">.</span><span class="n">scheme</span><span class="o">=</span><span class="n">http</span>
+ <span class="n">widget</span><span class="o">.</span><span class="n">proxy</span><span class="o">.</span><span class="n">hostname</span><span class="o">=</span><span class="k">my</span><span class="o">.</span><span class="n">wookie</span><span class="o">.</span><span class="n">org</span>
+ <span class="n">widget</span><span class="o">.</span><span class="n">proxy</span><span class="o">.</span><span class="n">port</span><span class="o">=</span><span class="mi">80</span>
+</pre></div>
+
+
+<p>Note that it is not currently possible to alter the servlet context name using a virtual host (e.g. mapping http://wookie.me.org to /wookie).</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/wookie/trunk/content/docs/developer/widgets.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/developer/widgets.html (added)
+++ websites/staging/wookie/trunk/content/docs/developer/widgets.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Deploying Widgets</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Deploying Widgets</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 id="deploying-widgets-when-building-wookie">Deploying widgets when building Wookie</h1>
+<p>When you build and run Wookie using Ant, you can select which sets of Widgets are to be included in the build. There are two collections of widgets available: <em>extras</em> and <em>scratchpad</em>.</p>
+<p><strong>Extras</strong> contains demonstration widgets that are useful for demonstrating Wookie and can also be used in live systems. These include some games, collaboration tools and simple information widgets.</p>
+<p><strong>Scratchpad</strong> contains experimental widgets, and include demonstrations of advanced features and widgets used for testing purposes.</p>
+<p>To configure which - if any - widgets are deployed with Wookie, you use the following properties in <code>build.properties</code>:</p>
+<div class="codehilite"><pre><span class="c1"># Uncomment to include Extra widgets</span>
+<span class="n">include</span><span class="o">.</span><span class="n">extra</span><span class="o">.</span><span class="n">widgets</span>
+<span class="c1"># Uncomment to include Scratchpad widgets</span>
+<span class="c1">#include.scratchpad.widgets</span>
+</pre></div>
+
+
+<p>To enable a set of widgets, uncomment the line "include.extra.widgets" and/or "include.scratchpad.widget".</p>
+<p>Note that you can install either set, both or none.</p>
+<h1 id="deploying-widgets-at-runtime">Deploying widgets at runtime</h1>
+<p>To deploy individual widgets at runtime, add the ".wgt" file to the <code>deploy</code> folder of the running web application. Wookie will unpack the widget and install it.</p>
+<p>Note that Wookie will ignore files that do not end in ".wgt".</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/wookie/trunk/content/docs/download.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/download.html (added)
+++ websites/staging/wookie/trunk/content/docs/download.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Dowload Apache Wookie (Incubating)</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Dowload Apache Wookie (Incubating)</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 id="downloads">Downloads</h1>
+<p>We provide binary distributions of the most recent stable release for your
+convenience. Many people will want to work with the <a href="source.html">source directly</a>, but this
+page will be useful for those just wanting to see Wookie in action or deploy
+a stable release.</p>
+<p><a href="source.html">Apache Wookie Source Releases</a> are available separately </p>
+<p>Apache Wookie 0.11.0-INCUBATING Standalone<br />
+</p>
+<ul>
+<li><a href="http://www.apache.org/dyn/closer.cgi/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.tar.gz">apache-wookie-0.11.0-incubating-standalone.tar.gz</a>   <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.tar.gz.md5">MD5 Checksum</a> <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.tar.gz.asc">Signature</a></li>
+<li><a href="http://www.apache.org/dyn/closer.cgi/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.zip">apache-wookie-0.11.0-incubating-standalone.zip</a>  <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.zip.md5">MD5 Checksum</a> <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.zip.asc">Signature</a></li>
+</ul>
+<p>Apache Wookie 0.11.0-INCUBATING WAR</p>
+<ul>
+<li><a href="http://www.apache.org/dyn/closer.cgi/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.tar.gz">apache-wookie-0.11.0-incubating-war.tar.gz</a> <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.tar.gz.md5">MD5 Checksum</a> <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.tar.gz.asc">Signature</a></li>
+<li><a href="http://www.apache.org/dyn/closer.cgi/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.zip">apache-wookie-0.11.0-incubating-war.zip</a>  <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.zip.md5">MD5 Checksum</a> <a href="http://www.apache.org/dist/incubator/wookie/0.11.0-incubating/binary/war/apache-wookie-0.11.0-incubating-war.zip.asc">Signature</a></li>
+</ul>
+<p>Please verify your downloads with the <a href="http://www.apache.org/dist/incubator/wookie/KEYS">Release Signing Keys</a></p>
+<h1 id="getting-started">Getting Started</h1>
+<h2 id="standalone-version">Standalone Version</h2>
+<p>The standalone version of wookie is not meant for full deployment purposes, 
+rather it is intended as an easy and simple way to quickly see what wookie
+is about without the need to configure various databases and servers.</p>
+<p>As such it uses a preconfigured Jetty server and Derby database that are 
+included in the download package. To run it you must have installed the
+<a href="http://java.com/en/download/">Java JDK</a></p>
+<p>To start the server run the startup.bat (Windows)  or startup.sh (<strong><em>*</em></strong>nix) script. </p>
+<p>To stop the server run the shutdown.bat (Windows) or shutdown.sh (<strong><em>*</em></strong>nix) script</p>
+<p>To view the running server visit http://localhost:8080/wookie</p>
+<p>For more information, see the STANDALONE_BUILD_NOTES file in the download package.</p>
+<h2 id="war-version">WAR Version</h2>
+<p>This build is meant to get a user started with the process of deploying
+Wookie under an existing application container and as such Wookie is made 
+available in WAR format. For more information on setup and configuration, 
+see the WAR_BUILD_NOTES file in the download package.</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/wookie/trunk/content/docs/embedding.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/embedding.html (added)
+++ websites/staging/wookie/trunk/content/docs/embedding.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,216 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Embedding widgets in your applications</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Embedding widgets in your applications</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <p>This document describes how to embed Wookie Widgets in third party applications.</p>
+<h2 id="overview-and-core-concepts">Overview and core concepts</h2>
+<p>To embed a Wookie widget in a host application you need to install (or create) 
+an appropriate plugin for your host environment. This will provide the bridge
+between your host platform and the Wookie server. Currently available plugins 
+include:</p>
+<ul>
+    <li><a href="http://community.elgg.org/pg/plugins/hoisl/read/385029/wookie-widgets" class="external-link" rel="nofollow">Elgg</a></li>
+    <li><a href="http://code.google.com/p/foogen/source/browse/#svn/trunk/drupal/module/didget" class="external-link" rel="nofollow">Drupal</a></li>
+    <li><a href="http://wiki.lamsfoundation.org/display/lamsdocs/Wookie+Widgets" class="external-link" rel="nofollow">LAMS</a></li>
+    <li><a href="http://moodle.org/mod/data/view.php?rid=3319" class="external-link" rel="nofollow">Moodle</a></li>
+    <li><a href="http://code.google.com/p/wookiewordpressplugin/" class="external-link" rel="nofollow">Wordpress</a></li>
+
+</ul>
+
+<p>If your environment is not listed above then you may need to implement a plugin - 
+don't worry, it's pretty easy, especially if we have a connector framework 
+available for you (see below) and we're here to help. Before embarking on this though
+be sure to do a thorough search for a pre-existing plugin we are not aware of. Please 
+let us know if you find one.</p>
+<p>Before we get into the details lets looks at some key terminology.</p>
+<h3 id="plugin">Plugin</h3>
+<p>A plugin is an extension to an existing web application that enables it to show 
+widgets that are being served by Wookie. A plugin implements the Wookie REST API 
+to discover which widgets are available, to request instances for particular 
+users, and to set participant information.</p>
+<p>Plugins are usually written in the programming language of the host web 
+application and may make use of an existing "widget" or "plugin" system, 
+extending it to support additional widgets made available by Wookie.</p>
+<h3 id="connector-framework">Connector Framework</h3>
+<p>Wookie provides connector framework code in many languages. These frameworks 
+provides most of the code you need to build a plugin for your platform.</p>
+<p>If you need a connector for a platform not listed above you need to implement
+your own using our provided connector frameworks. The latest versions of the 
+connector frameworks can be found in <a href="http://svn.apache.org/repos/asf/incubator/wookie/trunk/connector/">Subversion</a>.</p>
+<p>The documentation below refers to the Java connector. As far as possible we've kept
+to the names and method signatures the same in the connector framework for each 
+language.</p>
+<h3 id="implementing-a-connector-for-your-platform">Implementing a Connector for your Platform</h3>
+<p>To implement the connector you simply need to create an implementation of the 
+<a href="https://svn.apache.org/repos/asf/incubator/wookie/trunk/connector/java/src/org/apache/wookie/connector/framework/AbstractWookieConnectorService.java">AbstractWookieConnectorFrameowrk</a> class. This class provides abstract methods
+for communicating with the host environment.</p>
+<p>We provide a <a href="http://svn.apache.org/repos/asf/incubator/wookie/trunk/connector/java/src/org/apache/wookie/connector/framework/WookieConnectorService.java">reference implementation</a> of this AbstractClass that is used within
+Wookie itself. </p>
+<h3 id="concepts">Concepts</h3>
+<p>This section introduces the various concepts you need to understand in order to 
+build a connector for your host application.</p>
+<h4 id="viewer">Viewer</h4>
+<p>The viewer is the current user who is viewing a widget in the browser. 
+Typically an application uses session information to know who the current user is, 
+and this is used to request a particular widget instance. It is up to the plugin 
+to determine how to identify the viewer; for example the user's real id is one 
+possibility; another is an opaque hashcode using the id.</p>
+<h4 id="widget-instance">Widget Instance</h4>
+<p>A widget instance is a persistent instance of a particular widget created for a user. Each widget instance has its own storage area in Wookie. Widget Instances are created by invoking the Wookie REST API using an API Key and supplying values for the viewer and the shared data key.</p>
+<h4 id="api-key">API Key</h4>
+<p>An API Key is used to access many of the features of the Wookie REST API. Each individual web application needs its own API key. </p>
+<p>For information on creating and managing API keys, see the <a href="admin.html">Server Administration</a> documentation.</p>
+<h4 id="shared-data-key">Shared Data Key</h4>
+<p>The shared data key is an arbitrary identifier that marks widget instances as being sibling instances that can share state information. It is up to the plugin to determine this value; typically there is a persistent identifier available for whichever view is being used as the container for a widget.</p>
+<h2 id="basic-usage-of-the-framework">Basic usage of the framework</h2>
+<p>In this section we document the most basic use of the connector framework. All example code is written in Java, but it should be the same in other languages (if not, help us bring them all up to date).</p>
+<p>In general to use the framework you will need to:</p>
+<ul>
+    <li>get a WookieConnectorService</li>
+    <li>set the current user</li>
+    <li>get or create a widget instance</li>
+    <li>provide the instance URL to the hosting environment and display it</li>
+</ul>
+
+<h3 id="getting-a-connection-to-a-wookie-server">Getting a connection to a Wookie server</h3>
+<div class="codehilite"><pre><span class="o">/*</span>
+ <span class="o">*</span> <span class="n">Get</span> <span class="n">the</span> <span class="n">wookie</span> <span class="n">service</span> <span class="n">connector</span>
+ <span class="o">*/</span>
+<span class="n">public</span> <span class="n">WookieConnectorService</span> <span class="n">getWookieConnectorService</span><span class="p">(</span><span class="n">String</span> <span class="n">serverURL</span><span class="p">,</span> <span class="n">String</span> <span class="n">apiKey</span><span class="p">,</span> <span class="n">String</span> <span class="n">sharedDataKey</span> <span class="p">)</span> <span class="p">{</span>
+  <span class="k">if</span> <span class="p">(</span><span class="n">connectorService</span> <span class="o">==</span> <span class="n">null</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">connectorService</span> <span class="o">=</span> <span class="k">new</span> <span class="n">WookieConnectorService</span><span class="p">(</span><span class="n">serverURL</span><span class="p">,</span> <span class="n">apiKey</span><span class="p">,</span> <span class="n">sharedDataKey</span><span class="p">);</span>
+  <span class="p">}</span>
+  <span class="k">return</span> <span class="n">connectorService</span><span class="p">;</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h3 id="working-with-users">Working with users</h3>
+<p>Set the current user:</p>
+<div class="codehilite"><pre><span class="n">WookieConnectorService</span> <span class="n">conn</span> <span class="o">=</span> <span class="n">getWookieConnectorService</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">apiKey</span><span class="p">,</span> <span class="n">datakey</span><span class="p">);</span>
+<span class="n">conn</span><span class="o">.</span><span class="n">setCurrentUser</span><span class="p">(</span><span class="s">&quot;testuser&quot;</span><span class="p">);</span>
+</pre></div>
+
+
+<h3 id="working-with-widgets">Working with widgets</h3>
+<h4 id="get-a-widget-instance">Get a widget instance.</h4>
+<div class="codehilite"><pre><span class="n">String</span> <span class="n">guid</span> <span class="o">=</span> <span class="s">&quot;.....&quot;</span><span class="p">;</span>
+<span class="n">WidgetInstance</span> <span class="n">instance</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getOrCreateInstance</span><span class="p">(</span><span class="n">guid</span><span class="p">);</span>
+</pre></div>
+
+
+<h4 id="displaying-widgets">Displaying widgets</h4>
+<p>Displaying the widgets is the job of the platform in which you wish to embed 
+widgets. The easiest way to embed a widget is simply to place it in an iframe. 
+To do this you will need an URL for retrieving the widget instance, for example:</p>
+<div class="codehilite"><pre><span class="n">String</span> <span class="n">url</span> <span class="o">=</span> <span class="n">instance</span><span class="o">.</span><span class="n">getUrl</span><span class="p">();</span> <span class="sr">//</span> <span class="n">get</span> <span class="n">the</span> <span class="n">URL</span> <span class="n">from</span> <span class="n">the</span> <span class="n">WidgetInstance</span>
+<span class="n">displayWidget</span><span class="p">(</span><span class="n">url</span><span class="p">);</span> <span class="sr">//</span> <span class="n">a</span> <span class="n">method</span> <span class="n">you</span> <span class="n">implement</span> <span class="n">that</span> <span class="n">displays</span> <span class="n">the</span> <span class="n">data</span> <span class="n">at</span> <span class="n">the</span> <span class="n">URL</span>
+</pre></div>
+
+
+<h3 id="working-with-preferences-and-shared-data">Working with preferences and shared data</h3>
+<p>The connector framework also provides access to preferences and shared data for specific widget instances; for example, you can
+pre-populate information in a widget instance, such as the video to show in video player widget, or the initial location to use for a
+local weather information widget. For example, the following sets the widget preference key "city" to "manchester" for a single viewer:</p>
+<div class="codehilite"><pre><span class="n">conn</span><span class="o">.</span><span class="n">setPropertyForInstance</span><span class="p">(</span><span class="n">instance</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="s">&quot;city&quot;</span><span class="p">,</span> <span class="s">&quot;manchester&quot;</span><span class="p">);</span>
+</pre></div>
+
+
+<p>To set a property for all widget instances in the same context, use "true" for the second parameter.</p>
+<h3 id="using-admin-functions-from-a-connector-or-plugin">Using admin functions from a connector or plugin</h3>
+<p>The connector framework also supports (as of v0.10) calling the administrator APIs of a Wookie server, provided 
+you supply the correct admin credentials. This includes the ability to manage API keys, access policies for the built-in 
+proxy service, and even to add and remove widgets from the server. This means that you can use the connector framework 
+to build a complete admin client for Wookie. </p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/wookie/trunk/content/docs/faq.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/faq.html (added)
+++ websites/staging/wookie/trunk/content/docs/faq.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Frequently Asked Questions</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Frequently Asked Questions</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 id="how-do-widgets-in-wookie-get-around-same-origin-restrictions-for-ajax-requests">How do widgets in Wookie get around same-origin restrictions for Ajax requests?</h1>
+<p>The Widget javascript object available to running widgets has a <code>proxify()</code> method for just this purpose. Proxify wraps the request in a call to a proxy server.</p>
+<p>So: </p>
+<p><code>widget.proxify("http://example.org/myservice/")</code> </p>
+<p>results in a URL like:</p>
+<p><code>http://my.wookie.org/proxy?url=http://example.org/myservice/&amp;api</code>_<code>key=myapikey</code></p>
+<p>Shindig also uses the same method for OpenSocial applications, and has its own bundled proxy service.</p>
+<p>Wookie lets you use either; see the <em>widgetserver.properties</em> configuration file. This  contains instructions for specifying either no proxy, the Wookie service, or the Shindig one (assuming its available).</p>
+<p>Wookie's bundled proxy servlet is a bit stricter than the one bundled in Shindig, as it only allows text, xml or json (not binary), and can also be controlled using a whitelist set up by the Wookie administrator and using W3C WARP.</p>
+<p>Note: as widget.proxify() is not part of the W3C Widget Interface specification, to make your widget work properly in other W3C Widget engines you should always  check the function exists before trying to call it.</p>
+<h1 id="how-does-localization-work-in-wookie">How does localization work in Wookie?</h1>
+<p>Wookie implements the localization model described in the <a href="http://www.w3.org/TR/widgets/#internationalization-and-localization">W3C Widgets: Packaging and Configuration</a> specification. This means that Widgets contain "locale" folders for specific locales (eg. "/locales/et/index.html"), and Wookie will serve resources in matching locale folders in preference to generic resources. Wookie uses the 'locale' parameter of a request for a new widget as the preferred locale for resource requests; if this is absent then Wookie uses the server's default locale as picked up through system settings. We use <a href="http://site.icu-project.org/">ICU4J</a> for all locale processing, including locating system defaults.</p>
+<h1 id="when-i-run-wookie-in-tomcat-i-get-a-javasecurityaccesscontrolexception-access-denied-javautilpropertypermission-userdir-read">When I run Wookie in Tomcat I get a "java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)"</h1>
+<p>This problem occurs when the security manager is enabled in Tomcat, but without the proper permission assigned for Wookie. There is documentation that can help you define the security policy properly in section on <a href="developer/running.html#running_wookie_with_a_security_manager">Running Wookie</a>.</p>
+<h1 id="wookie-throws-a-javalangnosuchmethoderrorjavaxservletservletcontextgetcontextpath-exception-when-i-try-to-load-a-widget">Wookie throws a "java.lang.NoSuchMethodError:javax.servlet.ServletContext.getContextPath()" exception when I try to load a widget</h1>
+<p>This problem occurs in version of Apache Tomcat that do not support the current Servlet specification; to avoid this error update to Tomcat 6.0 or higher. See <a href="https://issues.apache.org/jira/browse/WOOKIE-105">Issue WOOKIE-105</a> for more information</p>
+<h1 id="why-cant-i-add-any-widgets-either-through-the-admin-interface-or-by-dropping-them-into-the-deploy-folder">Why can't I add any widgets, either through the admin interface or by dropping them into the deploy folder?</h1>
+<p>One of the most common reasons for this is that the application doesn't have permission to write to the wookie/wservices directory, which is where Wookie expands widgets when they are uploaded. For example, if you are deploying Wookie on Tomcat, make sure webapps/wookie is owned by the tomcat user and not by root.</p>
+<h1 id="my-widgets-do-not-seem-to-be-updating-the-preference-data-in-wookie">My widgets do not seem to be updating the preference data in wookie</h1>
+<p>This is a known issue. See <a href="https://issues.apache.org/jira/browse/WOOKIE-44">Issue WOOKIE-44</a> for more information. This problem typically occurs when using Internet Explorer (version 8 and less).  It is only flagged here as a warning because depending on how the widget calls the widget javascript API, you may or may not encounter a problem.  In essence there are two ways of setting a preference in your widgets javascript implementation...</p>
+<p>(1) widget.preferences.setItem("foo", "bar");
+(2) widget.preferences.foo = "bar";</p>
+<p>If your widget has been coded to only use method (1), there should not be a problem in Internet Explorer. However if your widget implementation uses method (2) or a combination of both, then you may experience unexpected results.</p>
+<p>If you are experiencing this problem and you are using Internet Explorer (version 8 or less), then...</p>
+<p>(1) update the javascript code to only use method (1) above in the affected widget
+OR
+(2) install Internet Explorer version 9, which should resolve the problem.</p>
+<p>Other browsers should be unaffected by this issue.</p>
+<h1 id="why-when-i-update-my-widget-and-load-it-back-onto-wookie-do-i-get-two-copies-of-my-widget-in-the-gallery">Why when I update my widget and load it back onto wookie do I get two copies of my widget in the gallery?</h1>
+<p>If your widget does not have an id defined in the widget's config.xml file or the id is not a valid URI then wookie will load but not update your widget.&nbsp; If this is the case then (for the moment) you will need to manually remove the old version of the widget using wookie's admin page.</p>
+<h1 id="why-do-i-get-a-dialog-box-saying-session-error-when-i-try-to-view-my-widget">Why do I get a dialog box saying "session error" when I try to view my widget?</h1>
+<p>There is a known issue when using Tomcat 7.* with Wookie (see <a href="https://issues.apache.org/jira/browse/WOOKIE-222">WOOKIE-222</a>). Sometimes when a widget is actually loaded, a browser alert box sometimes appears informing the user of a "Session Error". </p>
+<p>This is caused by the DWR library used by Wookie for Comet-based widgets handling HTTP-only cookies incorrectly;  Tomcat 7 uses HTTP-only cookies as the default setting to prevent cross-site scripting (XSS) attacks.</p>
+<p>A workaround is to add the following to the WEB-INF/web.xml file</p>
+<div class="codehilite"><pre><span class="nt">&lt;init-param&gt;</span>
+    <span class="nt">&lt;param-name&gt;</span>crossDomainSessionSecurity<span class="nt">&lt;/param-name&gt;</span>
+    <span class="nt">&lt;param-value&gt;</span>false<span class="nt">&lt;/param-value&gt;</span>
+<span class="nt">&lt;/init-param&gt;</span>
+</pre></div>
+
+
+<p>Note that XSS prevention will still be in place in Tomcat 7; this just disables the additional mechanism implemented in DWR that conflicts with it.</p>
+<p>This is an issue for DWR 2.<em> with Tomcat 7.</em> (or earlier versions of Tomcat where useHttpOnly="true" is set.)</p>
+<p>To set this to false for tomcat 7 you can add this to the context definition for wookie.
+This is found in</p>
+<p>TOMCAT-ROOT/conf/Catalina/localhost/wookie.xml</p>
+<p>The first line of xml needs to look like this</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">Context</span> <span class="n">crossContext</span><span class="o">=</span><span class="s">&quot;true&quot;</span> <span class="n">useHttpOnly</span><span class="o">=</span><span class="s">&quot;false&quot;</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<h1 id="can-i-run-wookie-from-a-usb-drive">Can I run Wookie from a USB drive?</h1>
+<p>Yes, more information can be found <a href="portable.html">here</a>.</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/wookie/trunk/content/docs/portable.html
==============================================================================
--- websites/staging/wookie/trunk/content/docs/portable.html (added)
+++ websites/staging/wookie/trunk/content/docs/portable.html Tue Nov 27 09:54:44 2012
@@ -0,0 +1,163 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/wookie/css/wookie.css" rel="stylesheet" type="text/css">
+  <link href="/wookie/css/code.css" rel="stylesheet" type="text/css">
+  <title>Apache Wookie (Incubating) - Portable Wookie
</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+
+<body>
+  <div id="banner">
+    <img alt="Apache Wookie (Incubating)" src="/wookie/images/logo.png"/>
+    <h1 class="title">Portable Wookie
</h1>
+  </div>
+  
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<ul>
+<li><a href="/wookie/index.html">Home</a></li>
+<li><a href="/wookie/news.html">News</a></li>
+<li><a href="/wookie/docs/download.html">Download</a></li>
+<li><a href="http://incubator.apache.org/projects/wookie.html">Incubator page</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/wookie/docs/download.html">Download and Quickstart</a></li>
+<li><a href="/wookie/docs/admin.html">Server Admin</a></li>
+<li><a href="/wookie/docs/embedding.html">Embedding</a></li>
+<li><a href="/wookie/docs/shindig.html">Integrating with Shindig</a></li>
+<li><a href="/wookie/docs/widgets.html">Building widgets</a></li>
+<li><a href="/wookie/docs/faq.html">FAQ</a></li>
+<li><a href="/wookie/docs/api.html">API Reference</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/wookie/get-involved.html">Get Involved</a></li>
+<li><a href="/wookie/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/wookie/people.html">People</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/wookie/docs/source.html">Getting Started</a></li>
+<li><a href="/wookie/docs/developer/running.html">Running</a></li>
+<li><a href="/wookie/docs/templates.html">Widget Templates</a></li>
+<li><a href="/wookie/docs/developer/features.html">Extension Features</a></li>
+<li><a href="/wookie/docs/developer/widgets.html">Deploying Widgets</a></li>
+<li><a href="/wookie/docs/develop.html">Environment</a></li>
+<li><a href="/wookie/docs/developer/release-management.html">Release Management</a></li>
+<li><a href="/wookie/docs/developer/issues.html">Issue Tracker</a></li>
+<li><a href="/wookie/docs/developer/index.html">Management</a></li>
+<li><a href="/wookie/docs/developer/parser.html">W3C Widget Parser</a></li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 id="running-wookie-from-a-usb-stick">Running Wookie from a USB Stick</h1>
+<p>While having Wookie installed on your machine is a relatively trivial task to setup, there may be some 
+situations where also having a Wookie environment on a removable USB pen/flash drive could be handy. 
+Having such a Wookie setup allows you to plug and play Wookie on more than one machine.</p>
+<p>The most simple method to create such an environment would be to use one of the current Wookie standalone 
+builds and configure that to run from your USB drive.  Another more slightly complicated method might be to 
+install the Wookie source code onto your USB drive, along with any developer tools needed to compile and run 
+that code.  What follows are some instructions on how you might go about doing these tasks. </p>
+<p>In order to run Wookie from a USB drive, we assume that you would also want to install a JDK onto your drive 
+(in case another machine does not have Java already installed).  However, bear in mind that because of the 
+differences in Java implementations on various platforms (Windows, Mac OS, Linux etc), you may be limited to a 
+windows/Mac OS/Linux portable version.  It may be possible to install more than one JDK onto your USB drive to 
+achieve a cross platform version, but this guide does not try to describe such an environment. </p>
+<h2 id="making-a-usb-drive-environment-from-a-wookie-standalone-build-windows-only">Making a USB drive environment from a Wookie standalone build (Windows only)</h2>
+<ul>
+    <li>If you haven't already, install a JDK to your local machine.</li>
+    Download a <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" class="external-link" rel="nofollow">Java JDK</a> (note the JRE is not sufficient)       
+    <br/><br/>
+    <li>Find the folder where your JDK is installed locally.</li>
+    For example it may be found at C:\Program Files\Java\jdk1.6.0_24
+    <br/><br/>
+    <li>Create a new "Java" folder at the ROOT of your USB drive. (e.g F:\Java)</li>
+    Copy the contents of C:\Program Files\Java\jdk1.6.0_24 to F:\Java.
+    <br/><br/>
+    <li>If you haven't already, download the latest Wookie Standalone build.</li>
+    Download <a href="http://www.apache.org/dyn/closer.cgi/incubator/wookie/0.11.0-incubating/binary/standalone/apache-wookie-0.11.0-incubating-standalone.zip" class="external-link" rel="nofollow">apache-wookie-0.11.0-incubating-standalone.zip</a>
+    <br/><br/>
+    <li>Unzip the download to the ROOT of your USB drive.</li>
+    This should create a new folder. (e.g F:\apache-wookie-0.11.0-incubating-standalone)
+    <br/><br/>
+    <li>Next you will need to modify Wookies startup.bat and shutdown.bat scripts</li>
+    First find the file F:\apache-wookie-0.11.0-incubating-standalone\startup.bat and open it to edit.
+    <br/>
+    Under the line...
+    <p>
+    Set PROGARGS=
+    </p>
+    ...add the following two lines underneath...
+    <p>
+    set pathDrive=%cd:~0,2%<br/>
+    set PATH=%PATH%;%pathDrive%\Java\bin
+    </p>
+    Now find the file F:\apache-wookie-0.11.0-incubating-standalone\shutdown.bat and open it to edit.
+    <br/>
+    Under the line...
+    <p>
+    REM under the License.
+    </p>
+    ...also add the same two lines underneath...
+    <p>
+    set pathDrive=%cd:~0,2%<br/>
+    set PATH=%PATH%;%pathDrive%\Java\bin
+    </p>
+    Save both files.
+    <br/><br/>
+    <li>You should now be able to use the USB installed version of the JDK to run Wookie on another Windows machine.</li>
+    Just double click the startup.bat/shutdown.bat scripts to start/stop Wookie. 
+</ul>
+
+<h2 id="making-a-usb-drive-developer-environment-for-wookie-sources">Making a USB drive Developer environment for Wookie sources</h2>
+<p>The previous instructions described how to use an existing build of Wookie to create a USB Wookie environment.  Additionally, it is 
+also possible to create a developer environment on a USB stick.  This means you would be able to change the source code and update 
+it, as well as receiving new updates to the code from other developers.  To do this you would have to download and install some 
+additional software to your USB stick, namely an SVN client and also <a href="http://ant.apache.org/">Apache Ant</a>.<br />
+</p>
+<p>Martin Hawksey has written an excellent guide on his blog detailing the process of creating such an 
+environment for windows. See his blog <a href="http://mashe.hawksey.info/2011/03/your-own-wookie-widget-server-on-a-usb-stick-pc/">here</a>.</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011-2012 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>