<?xml version="1.0"?>
<!--
  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.
-->
<document>
  <properties>
    <title>Adding a Page for the Tutorial Portlets</title>
    <subtitle>Adding a Page for the Tutorial Portlets</subtitle>
	<authors>
		<person name="David Sean Taylor" email="taylor@apache.org" />
	</authors>
  </properties>
  <body>
    <section name="Adding a Page for the Tutorial Portlets">
	<p>
	Now that we've created a new portlet, lets add a page to hold that portlet.
	In the <b>jetexpress</b> project, lets add a folder to the root of our site named
	<i>portal/src/webapp/WEB-INF/pages/tutorial/</i>. In addition to creating the folder,
	you will need to create a <i>folder.metadata</i> file:
	</p>
	 <source>	
	 <![CDATA[	
<?xml version="1.0" encoding="UTF-8"?>
<folder>
  <title >Tutorial</title>  
  <metadata name="title" xml:lang="fr">Autodidacte</metadata>

  <security-constraints>
    <security-constraints-ref>public-edit</security-constraints-ref>
  </security-constraints>
</folder>	 
	     ]]>
	</source> 		
	<p>
	Then lets add a new page named <b>default-page.psml</b> under the tutorial directory.
	Add a portlet window to reference our new portlet:
	</p>
	 <source>	
	 <![CDATA[
<page>
  <defaults layout-decorator="express-page" 
            portlet-decorator="express-portlet"
            skin="express"/>
  <title>JetExpress Tutorials</title>
  <short-title>Tutorials</short-title>
  <fragment id="tutorial-100" type="layout" name="jetspeed-layouts::VelocityTwoColumns">  
	  <fragment id="express-101" type="portlet" name="express-demo::BonjourMonde"/>
  </fragment>
</page>	 
	     ]]>
	</source> 	
	<p>Lets deploy our portlet and the new pages:
	</p>
	 <source>	
	 <![CDATA[
# Linux	 
cd /JetspeedTraining/workspace/jetexpress
ant
cd applications/express-demo
mvn 
cp target/express-demo-1.0.war /JetspeedTraining/tomcat-express/webapps/express-demo.war

# Windows
cd \JetspeedTraining\workspace\jetexpress
ant
cd applications\express-demo
mvn 
copy target\express-demo-1.0.war \JetspeedTraining\tomcat-express\webapps\express-demo.war
	     ]]>
	</source> 		
	  <p>
	    <a href='hello.html'>Previous</a> <a href='taglib.html'>Next</a>
	  </p>            	
    </section>
  </body>
</document>
	