Adding a Page for the Tutorial Portlets

Now that we've created a new portlet, lets add a page to hold that portlet. In the jetexpress project, lets add a folder to the root of our site named portal/src/webapp/WEB-INF/pages/tutorial/. In addition to creating the folder, you will need to create a folder.metadata file:

	
	 	
<?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>	 
	     
	

Then lets add a new page named default-page.psml under the tutorial directory. Add a portlet window to reference our new portlet:

	
	 
<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>	 
	     
	

Lets deploy our portlet and the new pages:

	
	 
# 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
	     
	

Previous Next