Adding a Page for the Tutorial Portlets

Now that you have created a new portlet, let's add a page to hold that portlet. In the jetexpress-portal project, add a folder to the root of our site named src/main/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"?>
  <title >Tutorial</title>  
  <metadata name="title" xml:lang="fr">Autodidacte</metadata>

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

<?xml version="1.0" encoding="UTF-8"?>
  <defaults layout-decorator="jetexpress" 
  <title>JetExpress Tutorials</title>
  <fragment id="tutorial-100" type="layout" name="jetspeed-layouts::VelocityTwoColumns">  
    <fragment id="express-101" type="portlet" name="jetexpress-pa::BonjourMonde"/>

Stop Tomcat and deploy your portlet and the new pages:

mvn jetspeed:mvn -Dtarget=deploy-pa
mvn jetspeed:mvn -Dtarget=deploy-portal

After you restart Tomcat and log in to the portal, you will see the new tutorial page in the left menu:

Click on the tutorial link to see the new page with the BonjourMonde portlet:



Previous - Next