taylor      2004/05/18 12:52:28

  Added:       archives/WEB-INF/layout clear-top.jsp columns.jsp
                        portletstd-top.jsp clear-bottom.jsp
                        portletstd-bottom.jsp
               archives OLD-GETTING-STARTED.txt
  Log:
  moved some deprecated code and resources to archives

  

  PR:

  Obtained from:

  Submitted by: 

  Reviewed by:  

  CVS: ----------------------------------------------------------------------

  CVS: PR:

  CVS:   If this change addresses a PR in the problem report tracking

  CVS:   database, then enter the PR number(s) here.

  CVS: Obtained from:

  CVS:   If this change has been taken from another system, such as NCSA,

  CVS:   then name the system in this line, otherwise delete it.

  CVS: Submitted by:

  CVS:   If this code has been contributed to Apache by someone else; i.e.,

  CVS:   they sent us a patch or a new module, then include their name/email

  CVS:   address here. If this is your work then delete this line.

  CVS: Reviewed by:

  CVS:   If we are doing pre-commit code reviews and someone else has

  CVS:   reviewed your changes, include their name(s) here.

  CVS:   If you have not had it reviewed then delete this line.

  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/layout/clear-top.jsp
  
  Index: clear-top.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

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

  --%>

  <%@ page language="java"  session="false" %>

  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>

  <portlet:defineObjects/>

  <!-- Clear decorator top -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/layout/columns.jsp
  
  Index: columns.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

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

  --%>

  <%@ page language="java" 

           import="javax.portlet.*, java.util.*, org.apache.jetspeed.aggregator.*, 
org.apache.jetspeed.om.page.*"

           session="false" %>

  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>

  <portlet:defineObjects/>

  

  <% 

  

  List[] table = (List[])renderRequest.getAttribute("columns");

  Page myPage = (Page)renderRequest.getAttribute("page");

  

  Fragment myFragment = (Fragment)renderRequest.getAttribute("fragment");

  ContentDispatcher dispatcher = 
(ContentDispatcher)renderRequest.getAttribute("dispatcher");  

  org.apache.pluto.om.entity.PortletEntity portletEntity = 

            org.apache.jetspeed.entity.PortletEntityAccess.getEntity(

                
org.apache.jetspeed.util.JetspeedObjectID.createFromString(myFragment.getId()));

  

  renderRequest.setAttribute("entity",portletEntity);

  %>

  <%

    String decorator = myPage.getDefaultDecorator(myFragment.getType());

    String decoTop = null;

    String decoBottom = null;

    

    if (myFragment.getDecorator()!=null)

    {

          decorator = myFragment.getDecorator();

    }

  

    if (decorator != null)

    {

          decoTop = decorator+"-top.jsp";

          decoBottom = decorator+"-bottom.jsp";

    }

  %>

  <!-- Decorator <%= decorator %>  <%=decoTop%>-<%=decoBottom%>-->

  <%

    if ((decoTop != null) && (myFragment == myPage.getRootFragment()))

    {

  %>

  <jsp:include page="<%=decoTop%>" />

  <%

    }

  %>

  <table width="100%" cellspacing="0" cellpadding="0">

    <tr>

    <%

       for(int i=0; i < table.length; i++)

       {

    %>

      <td valign="top"><table width="100%">

      <%

          for(Iterator it=table[i].iterator(); it.hasNext();)

          {

             Fragment f = (Fragment)it.next();

             org.apache.pluto.om.entity.PortletEntity fPE =

               org.apache.jetspeed.entity.PortletEntityAccess.getEntity(

                 
org.apache.jetspeed.util.JetspeedObjectID.createFromString(f.getId()));

             String fDeco = myPage.getDefaultDecorator(f.getType());

             String fDecoTop = null;

             String fDecoBottom = null;

             

             if (f.getDecorator()!=null)

             {

                  fDeco = f.getDecorator();

             }

             

             if (fDeco != null)

             {

                  fDecoTop = fDeco+"-top.jsp";

                  fDecoBottom = fDeco+"-bottom.jsp";

             }

             

             renderRequest.setAttribute("fragment",f);

             renderRequest.setAttribute("entity",fPE);

       %>

       <tr><td width="100%">

       <%

             if (fDecoTop != null)

             {

       %>

       <jsp:include page="<%=fDecoTop%>" />

       <%

             }

       %>

       <%

             out.flush();

             if (!"hidden".equals(f.getState()))

             {

                  dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest, 
(javax.portlet.RenderResponse)renderResponse);

             }

        %>

       <%

             if (fDecoBottom != null)

             {

       %>

       <jsp:include page="<%=fDecoBottom%>" />

       <%

             }

       %>

       </td></tr>

       <%

          }

       %>

       </table></td>

    <%

       }

    %>

    </tr>

  </table>

  <%

    renderRequest.setAttribute("fragment",myFragment);

    renderRequest.setAttribute("entity",portletEntity);

  

    if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))

    {

  %>

  <jsp:include page="<%=decoBottom%>" />

  <%

    }

  %>

  
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/layout/portletstd-top.jsp
  
  Index: portletstd-top.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

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

  --%>

  <%@ page language="java" 
import="org.apache.jetspeed.om.page.*,org.apache.pluto.om.entity.*" session="false" %>

  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>

  <portlet:defineObjects/>

  <% 

  Page myPage = (Page)renderRequest.getAttribute("page");

  Fragment myF = (Fragment)renderRequest.getAttribute("fragment");

  PortletEntity myPE = (PortletEntity)renderRequest.getAttribute("entity");

  %>

  <!-- Portlet Std Decorator top -->

  <table width="100%" cellspacing"0" cellpadding="0">

  <tr>

    <td bgcolor="<%=myPage.getDefaultSkin()%>">

    <table width="100%">

    <tr>

      <td><% if (myPE!=null) out.write(myPE.getPortletDefinition().getName());%></td>

      <td>

      </td>

    </tr>

    </table>

    </td>

  </tr>

  <tr><td width="100%" valign="top">
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/layout/clear-bottom.jsp
  
  Index: clear-bottom.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

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

  --%>

  <%@ page language="java"  session="false" %>

  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>

  <portlet:defineObjects/>

  <!-- Clear decorator bottom -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/layout/portletstd-bottom.jsp
  
  Index: portletstd-bottom.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

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

  --%>

  <%@ page language="java"  session="false" %>

  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>

  

  </td>

  </tr>

  </table>

  <!-- Portlet Std Decorator bottom -->
  
  
  1.1                  jakarta-jetspeed-2/archives/OLD-GETTING-STARTED.txt
  
  Index: OLD-GETTING-STARTED.txt
  ===================================================================
  Copyright 2004 The Apache Software Foundation
  
  Licensed 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.
  
  ----------------
  GETTING STARTED
  ----------------
  
  Requirements
  -------------
  1. Ant 1.5 or higher
  2. Maven 0.8 or higher
       Maven Beta 9 Note:
  Delete all of these lines from the jar creation section
  
  <j:set var="extensionList" value=""/>
         <j:forEach var="artifact" items="${pom.artifacts}">
           <j:set var="dep" value="${artifact.dependency}"/>
           <j:set var="extensionList" value="${extensionList},${dep.artifactId}"/>
         </j:forEach>
  
       <j:if test="${extensionList.length() != 0}">
                  <j:set var="extensionList" value="${extensionList.substring(1)}"/>
           <ant:attribute name="Extension-List" value="${extensionList}"/>
         </j:if>
  
               <j:forEach var="artifact" items="${pom.artifacts}">
           <j:set var="dep" value="${artifact.dependency}"/>
           <ant:attribute name="${dep.artifactId}-Extension-Name" 
value="${dep.artifactId}"/>
           <ant:attribute name="${dep.artifactId}-Implementation-Version" 
value="${dep.version}"/>
           <ant:attribute name="${dep.artifactId}-Implementation-URL" 
value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
         </j:forEach>      
   
  3. Java 1.3 or higher
  4. Servlet 2.3
       Tomcat 4.1.18-LE w/JDK 1.4
       Tomcat 4.1.24 w/ JDK 1.3
  
  5. Define the following in the user's build.properties
      catalina.shared.lib = ${CATALINA_HOME}/shared/lib/
      deploy.war.dir = ${CATALINA_BASE}/webapps/
  
  6.  Edit ${CATALINA_BASE}/conf/server.xml, add this line:
      (this only needs to be done once)
  
       <Context path="/jetspeed" docBase="jetspeed" crossContext="true"/>
       
  7.  Maven will download all necessary jars into it's repository as needed.  However, 
there are 2 jars that are not available via maven.
        
        JTA 1.0.1 B - This can be downloaded from http://java.sun.com/products/jta.  
        Install the zip file into ${MAVEN_HOME}/repository/jta/jars as jta1.0.1.jar
        
        JDBC 2.0 SE - This can be downloaded from 
http://java.sun.com/products/jdbc/download.html.  Choose the JDBC(TM) 2.0 Optional 
Package.
        Install the jar file into ${MAVEN_HOME}/repository/jdbc-se/jars as 
jdbc-se2.0.jar
  
  ---------------------------------------------
  Building - instructions as of May 26, 2003
  ---------------------------------------------
  1a. Build all jars and wars:
       cd {$jetspeed-2-home}
       maven allBuild
  
  
  1b Build all jars and wars in steps
     1. Build Portlet-API
         cd {$jetspeed-2-home}/portlet-api
         maven jar:install
  
     2. Build Jetspeed Commons
         cd {$jetspeed-2-home}/commons
         maven jar:install
  
     3. Build Container
         cd {$jetspeed-2-home}/container
         maven jar:install
  
     4. Build the demo web application 
         cd {$jetspeed-2-home}/applications/demo
         maven war
  
     5. Build Jetspeed Portal
         cd {$jetspeed-2-home}/portal
         maven war
  
  2. Install into Catalina Shared
      cd {$jetspeed-2-home}
      maven catalina:base-shared
      maven catalina:shared
  
  
  !!!! NOTE !!!!! make sure you have defined a property in your local  build.properties
  located in your user directory to point to the correct database alias.
  example: 
    deployment.db.alias=/C:/webapps/jetspeed2/webapps/jetspeed/WEB-INF/db/hsql/Registry
    
  3. Deploy Jetspeed Portal WAR into Catalina
      cd {$jetspeed-2-home}/portal
      maven deploy
      
  4. Install the demo web application into Catalina
      cd {$jetspeed-2-home}/portal
      maven pam.deploy 
    
  5. Run Tomcat, go to Jetspeed
  
  6. To undeploy the demo app
      cd {$jetspeed-2-home}/portal
      maven pam.undeploy 
  
  NOTE: im experience a problem where the portlet-container jar isn't the latest one 
copied into the HW_APP webapp
        this causes HelloPortlet to not display any info
        Its easily fixed by manually copying 
    ${maven.repo.home}/jetspeed2/jars/jetspeed-container-2.0-a1-dev.jar 
${catalina.home}/webapps/HW_APP/WEB-INF/lib/
  
    I also think that this jar should not be put in the WAR during WAR creation, but 
should either be:
      a) in catalina shared
      or
      b) merged into the deployed web app by the PAM
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to