📄 portal.xml.svn-base
字号:
<?xml version="1.0" encoding="UTF-8"?><!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements. See the NOTICE file distributed withthis 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 withthe License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.See the License for the specific language governing permissions andlimitations under the License.--><document><properties> <title>User Guide: Pluto Portal Driver</title></properties><body><section name="User Guide: Pluto 1.0.1 Portal Driver"> <p> <ul> <li><A href="#Limitations">Limitations</A></li> <li><A href="#Configuration">Configuration</A></li> <li><A href="#Defining_the_Portal_Layout">Defining the Portal Layout</A></li> <li><A href="#Advanced_Customization">Advanced Customization</A></li> <li><A href="#Internationalization">Internationalization</A></li> <li><A href="#Further_Information">Further Information</A></li> </ul> </p></section><section name="Limitations"> <p> The Pluto Portal is intended to provide an example implementation of how to integrate Pluto into a portal. Additionally, it may be used for the development of compliant portlets. In some places it lacks the flexibility a true portal supplies. The portal is not designed for maximum performance, but rather simplicity. </p> <p> To learn how to embed Pluto in your own portal, see the "<a href="../developer/integrate.html">Integration Guide</a>" document.</p></section><section name="Configuration"> <subsection name="Default Configuration"> <p> Upon installation of the binary distribution of Pluto 1.0.1, the portal driver is made available at <code>http://localhost:8080/pluto/portal</code>. The default installation is configured with a portal page which contains two instances of the testsuite portlet and an administration. portlet for installing custom portlets and viewing the repositories. This configuration is also the default for installations completed from the source distribution (or Subversion repository) and deployed using the Pluto deploy tool. </p> <p> <table> <caption><B>Default Configuration for Binary Distributions:</B></caption> <tr><th>Configuration</th> <th>Platform</th> <th>Value</th><th>Description</th></tr> <tr><td>Installation Directory</td> <td>All</td> <td><PLUTO_HOME></td> <td>The directory to which you unarchived the distribution</td></tr> <tr><td>Startup Scripts</td> <td>*nix</td> <td><PLUTO_HOME>/bin/startup.sh</td> <td>The script used to startup the portal driver</td></tr> <tr><td>Startup Scripts</td> <td>Windows</td> <td><PLUTO_HOME>/bin/startup.bat</td> <td>The script used to startup the portal driver</td></tr> <tr><td>Context Configuration</td> <td>All</td> <td><PLUTO_HOME>/conf/Catalina/localhost/pluto.xml</td> <td>The Tomcat Context Configuration file</td></tr> </table> </p> <p> <table> <caption><B>Default Configuration for Source Distributions:</B></caption> <tr><th>Configuration</th> <th>Platform</th> <th>Value</th><th>Description</th></tr> <tr><td>Installation Directory</td> <td>All</td> <td>${maven.tomcat.home}</td> <td>The tomcat installation directory to which pluto has been installed</td></tr> <tr><td>Startup Scipts</td> <td>*nix</td> <td>${maven.tomcat.home}/bin/startup.sh</td> <td>The script used to startup the portal driver</td></tr> <tr><td>Startup Scipts</td> <td>Windows</td> <td>${maven.tomcat.home}/bin/startup.bat</td> <td>The script used to startup the portal driver</td></tr> <tr><td>Context Configuration</td> <td>Tomcat 5.5</td> <td>${maven.tomcat.home}/conf/Catalina/localhost/pluto.xml</td> <td>The Tomcat Context Configuration file</td></tr> </table> </p> <p>When the Pluto Portal is first installed, it is made available at the address http://localhost:8080/pluto/portal/.</p> <p>This location can be customized, using standard Tomcat functionality. To modify the <i>pluto</i> part of the location, alter the path mapping in pluto's context configuration file <i>pluto.xml</i></p> <p>Under Tomcat 5.5, pluto.xml will be located in the ${TOMCAT_HOME}/conf/Catalina/ directory. </p> <p>In order to modify the context Pluto is running under, modify the <i>path</i> attribute:</p> <p> <b>Before:</b> <source> <Context path="/pluto" docBase="pluto" crossContext="true"> </Context> </source> </p> <p><b>After:</b> <source> <Context path="/newlocation" docBase="pluto" crossContext="true"> </Context> </source> </p> <p>You might also need to modify host.name and portletcontainer.uniquename in ${TOMCAT_HOME}/webapps/pluto/WEB-INF/config/services/ConfigService.properties. </p> <p>After this modification (and restarting Tomcat), the Pluto Portal will be available at the address http://servername/newlocation/portal/. Further information on customizing the context configuration is available for <a href="http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html">Tomcat 5.5</a>. </p> <p>To modify the <i>portal</i> part of the location, alter the <i>url-pattern</i> for the <i>pluto</i> servlet. This mapping can be found in the <i>web.xml</i> configuration file for the Pluto web application.</p> <p> <b>Before:</b> <source> <servlet-mapping> <servlet-name>pluto</servlet-name> <url-pattern>/portal/*</url-pattern> </servlet-mapping> </source> </p> <p> <b>After:</b> <source> <servlet-mapping> <servlet-name>pluto</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping> </source> </p> <p>You will also need to modify servlet.insecure in ${TOMCAT_HOME}/webapps/pluto/WEB-INF/config/services/ConfigService.properties. </p> <p>After these modifications (and restarting Tomcat), the Pluto Portal will be available at the address http://servername/newlocation/app/ (assuming that the previous modification was also applied). </p> </subsection> <subsection name="Registering Portlets for use"> <p>In order to use a Portlet in the Pluto Portal it needs to be registered. The Pluto Portal keeps page registrations in a file named <i>portletentityregistry.xml</i> in the directory ${TOMCAT_HOME}/webapps/pluto/data.</p> <p>By default, this file looks like this: <source><?xml version="1.0" encoding="UTF-8"?><portlet-entity-registry> <application id="3"> <definition-id>testsuite</definition-id> <portlet id="1"> <definition-id>testsuite.TestPortlet1</definition-id> <preferences> <pref-name>TestName4</pref-name> <pref-value>TestValue4</pref-value> <read-only>true</read-only> </preferences> </portlet> </application> <application id="4"> <definition-id>testsuite</definition-id> <portlet id="1"> <definition-id>testsuite.TestPortlet2</definition-id> <preferences> <pref-name>TestName4</pref-name> <pref-value>TestValue4</pref-value> <read-only>true</read-only> </preferences> </portlet> </application></portlet-entity-registry> </source> </p> <p>Each <application> tag defines one application (corresponding to one web-app on the portal container), which can contain multiple <portlet> tags. The "id" attribute in this tag identifies the application, and it does not need to be numeric.</p> <p>The <definition-id> tag within the <application> refers to the name of the web-app that contains the portlets in this application.</p> <p>Each <portlet> tag defines one portlet. The "id" attribute in this tag identifies the portlet. Note that the application id concatenated with the portlet id will be mapped to the "value" attribute in the <proprety> tag in pageregistry.xml (which is explained later).</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -