portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/conf demo-portlets.xreg
Date Tue, 23 Oct 2001 01:29:02 GMT
paulsp      01/10/22 18:29:02

  Modified:    webapp/WEB-INF/conf demo-portlets.xreg
  Added:       webapp/WEB-INF/templates/jsp/portlets/html
                        JSP1_2andJetspeedTagLib.jsp
  Log:
  Add a JSP example
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/jsp/portlets/html/JSP1_2andJetspeedTagLib.jsp
  
  Index: JSP1_2andJetspeedTagLib.jsp
  ===================================================================
  <%@ page language="java"
           import="java.util.Enumeration"
           session="false"
  %>
  <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
      <html>
  <!--
    Copyright (c) 1999 The Apache Software Foundation.  All rights 
    reserved.
  -->
  
  <!--
   A JSP portlet example that displays Jetspeed TagLib and servlet request
   data. 
  
   @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
  -->
    <body>
      <center><h1>Jetspeed Tag Library</h1></center>
      <center><h2>jetspeed:info</h2></center>
      <table>
        <tr>
          <th>requestedInfo</th>
          <th>Returned Value</th>
        </tr>
        <tr>
          <td>Email</td>
          <td><jetspeed:info requestedInfo="Email" /></td>
        </tr>
        <tr>
          <td>FirstName</td>
          <td><jetspeed:info requestedInfo="FirstName" /></td>
        </tr>
        <tr>
          <td>LastName</td>
          <td><jetspeed:info requestedInfo="LastName" /></td>
        </tr>
        <tr>
          <td>UserName</td>
          <td><jetspeed:info requestedInfo="UserName" /></td>
        </tr>
        <tr>
          <td>ServerDate</td>
          <td><jetspeed:info requestedInfo="ServerDate" /></td>
        </tr>
      </table>
  
      <center><h2>jetspeed:uriLookup</h2></center>
      <table>
        <tr>
          <th>Type</th>
          <th>Returned Value</th>
        </tr>
        <tr>
          <td>Customize</td>
          <td><jetspeed:uriLookup type="Customize" /></td>
        </tr>
        <tr>
          <td>EditAccount</td>
          <td><jetspeed:uriLookup type="EditAccount" /></td>
        </tr>
        <tr>
          <td>Login</td>
          <td><jetspeed:uriLookup type="Login" /></td>
        </tr>
        <tr>
          <td>Logout</td>
          <td><jetspeed:uriLookup type="Logout" /></td>
        </tr>
        <tr>
          <td>Home</td>
          <td><jetspeed:uriLookup type="Home" /></td>
        </tr>
      </table>
  
      <center><h2>jetspeed:contentUri</h2></center>
      <table>
        <tr>
          <th>href</th>
          <th>Returned Value</th>
        </tr>
        <tr>
          <td>apidocs/</td>
          <td><jetspeed:contentUri href="apidocs/" /></td>
        </tr>
        <tr>
          <td>docs/</td>
          <td><jetspeed:contentUri href="docs/" /></td>
        </tr>
        <tr>
          <td>rss/</td>
          <td><jetspeed:contentUri href="rss/" /></td>
        </tr>
      </table>
  
      <hr/>
      <center><h1>HTTP Request Header</h1></center>
      <table>
        <tr>
          <th>Name</th>
          <th>Returned Value</th>
        </tr>
        <tr>
          <td>Auth Type</td>
          <td><%= request.getAuthType() %></td>
        </tr>
        <tr>
          <td>Character Encoding</td>
          <td><%= request.getCharacterEncoding() %></td>
        </tr>
        <tr>
          <td>Content Length</td>
          <td><%= request.getContentLength() %></td>
        </tr>
        <tr>
          <td>Content Type</td>
          <td><%= request.getContentType() %></td>
        </tr>
        <tr>
          <td>Context Path</td>
          <td><%= request.getContextPath() %></td>
        </tr>
        <tr>
          <td>Method</td>
          <td><%= request.getMethod() %></td>
        </tr>
        <tr>
          <td>Path Info</td>
          <td><%= request.getPathInfo() %></td>
        </tr>
        <tr>
          <td>Path Translated</td>
          <td><%= request.getPathTranslated() %></td>
        </tr>
        <tr>
          <td>Protocol</td>
          <td><%= request.getProtocol() %></td>
        </tr>
        <tr>
          <td>Query String</td>
          <td><%= request.getQueryString() %></td>
        </tr>
        <tr>
          <td>Remote Address</td>
          <td><%= request.getRemoteAddr() %></td>
        </tr>
        <tr>
          <td>Remote Host</td>
          <td><%= request.getRemoteHost() %></td>
        </tr>
        <tr>
          <td>Remote User</td>
          <td><%= request.getRemoteUser() %></td>
        </tr>
        <tr>
          <td>Requested Session Id</td>
          <td><%= request.getRequestedSessionId() %></td>
        </tr>
        <tr>
          <td>Requested Session Id from Cookie</td>
          <td><%= request.isRequestedSessionIdFromCookie() %></td>
        </tr>
        <tr>
          <td>Requested Session Id from URL</td>
          <td><%= request.isRequestedSessionIdFromURL() %></td>
        </tr>
        <tr>
          <td>Request URI</td>
          <td><%= request.getRequestURI() %></td>
        </tr>
        <tr>
          <td>Request URL</td>
          <td><%= request.getRequestURL() %></td>
        </tr>
        <tr>
          <td>Scheme</td>
          <td><%= request.getScheme() %></td>
        </tr>
        <tr>
          <td>Secure</td>
          <td><%= request.isSecure() %></td>
        </tr>
        <tr>
          <td>Server Name</td>
          <td><%= request.getServerName() %></td>
        </tr>
        <tr>
          <td>Server Port</td>
          <td><%= request.getServerPort() %></td>
        </tr>
        <tr>
          <td>Servlet Path</td>
          <td><%= request.getServletPath() %></td>
        </tr>
      </table>
  
      <center><h2>HTTP Headers</h2></center>
      <table>
        <tr>
          <th>Name</th>
          <th>Value</th>
        </tr>
  <%
        Enumeration e = request.getHeaderNames();
  
        while (e.hasMoreElements()) {
          String name = (String)e.nextElement();
          String value = request.getHeader(name);
          out.println("<tr><td>" + name + "</td><td>" + value + "</td></tr>");
        }
  %>
      </table>
  
      <center><h2>Attributes</h2></center>
      <table>
        <tr>
          <th>Name</th>
        </tr>
  <%
        e = request.getAttributeNames();
  
        while (e.hasMoreElements()) {
          String name = (String)e.nextElement();
          out.println("<tr><td>" + name + "</td></tr>");
        }
  %>
      </table>
  
      <center><h2>Parameters</h2></center>
      <table>
        <tr>
          <th>Name</th>
          <th>Value</th>
        </tr>
  <%
        e = request.getParameterNames();
  
        while (e.hasMoreElements()) {
          String name = (String)e.nextElement();
          String value = request.getParameter(name);
          out.println("<tr><td>" + name + "</td><td>" + value + "</td></tr>");
        }
  %>
      </table>
      <center><h2>Cookies</h2></center>
      <table>
        <tr>
          <th>Name</th>
          <th>Value</th>
        </tr>
  <%
        Cookie[] cookies = request.getCookies();
  
        for (int i = 0; i < cookies.length; i++) {
          out.println("<tr><td>" + cookies[i].getName() + "</td><td>"
+ cookies[i].getValue() + "</td></tr>");
        }
  %>
      </table>
    </body>
  </html>
  
  
  1.2       +13 -0     jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg
  
  Index: demo-portlets.xreg
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- demo-portlets.xreg	2001/10/19 21:00:24	1.1
  +++ demo-portlets.xreg	2001/10/23 01:29:02	1.2
  @@ -21,6 +21,19 @@
               value="hello.jsp" hidden="false"/>
           <media-type ref="html"/>
       </portlet-entry>
  +    <portlet-entry name="JSP1_2andJetspeedTagLib" hidden="false" type="ref"
  +        parent="JSP" application="false">
  +        <meta-info>
  +            <title>JSP1_2andJetspeedTagLib</title>
  +            <description>
  +              JSP Portlet Example that displays data from the Jetspeed
  +              Tag Libaray and Java Servlet request class
  +            </description>
  +        </meta-info>
  +        <parameter name="template"
  +            value="JSP1_2andJetspeedTagLib.jsp" hidden="false"/>
  +        <media-type ref="html"/>
  +    </portlet-entry>
       <portlet-entry name="Search" hidden="false" type="ref" parent="HTML" application="false">
           <meta-info>
               <title>Search</title>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message