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/templates/jsp/portlets/html JSP1_1andJetspeedTagLib.jsp
Date Tue, 09 Jul 2002 16:35:06 GMT
paulsp      2002/07/09 09:35:06

  Modified:    webapp/WEB-INF/conf demo-portlets.xreg
  Added:       webapp/WEB-INF/templates/jsp/portlets/html
                        JSP1_1andJetspeedTagLib.jsp
  Log:
  Added JSP 1.1 example
  PR: 10325
  
  Revision  Changes    Path
  1.16      +18 -1     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- demo-portlets.xreg	1 Jul 2002 05:54:10 -0000	1.15
  +++ demo-portlets.xreg	9 Jul 2002 16:35:05 -0000	1.16
  @@ -39,13 +39,30 @@
           <category>demo</category>
           <category>jsp.demo</category>
       </portlet-entry>
  +    <portlet-entry name="JSP1_1andJetspeedTagLib" hidden="false" type="ref"
  +        parent="JSP" application="false">
  +        <meta-info>
  +            <title>JSP1_1andJetspeedTagLib</title>
  +            <description>
  +              JSP Portlet Example that displays data from the Jetspeed
  +              Tag Libaray and Java Servlet v1.2 request class.  Requires a
  +              Tomcat v3.x or a JSP 1.1 servlet engine.
  +            </description>
  +        </meta-info>
  +        <parameter name="template"
  +            value="JSP1_1andJetspeedTagLib.jsp" hidden="false"/>
  +        <media-type ref="html"/>
  +        <category>demo</category>
  +        <category>jsp.demo</category>
  +    </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
  +              Tag Libaray and Java Servlet v1.2 request class.  Requires a
  +              Tomcat v4.x or a JSP 1.2 servlet engine.
               </description>
           </meta-info>
           <parameter name="template"
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/jsp/portlets/html/JSP1_1andJetspeedTagLib.jsp
  
  Index: JSP1_1andJetspeedTagLib.jsp
  ===================================================================
  <%@ page language="java"
           import="java.util.Enumeration"
           session="false"
  %>
  <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
      <html>
  <!--
    Copyright (c) 2001 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>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();
  
        if (cookies != null)
        {
          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>
  
  

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


Mime
View raw message