jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@locus.apache.org
Subject cvs commit: jakarta-taglibs/request/examples/web request.jsp
Date Sun, 24 Sep 2000 00:06:04 GMT
glenn       00/09/23 17:06:04

  Modified:    request/examples/web request.jsp
  Log:
  Update for new tags
  
  Revision  Changes    Path
  1.2       +49 -0     jakarta-taglibs/request/examples/web/request.jsp
  
  Index: request.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/request/examples/web/request.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- request.jsp	2000/09/21 14:14:45	1.1
  +++ request.jsp	2000/09/24 00:06:03	1.2
  @@ -27,12 +27,28 @@
          Version: <jsp:getProperty name="oatmeal" property="version"/>
   </req:cookies>
   
  +See if JSESSIONID Cookie exists
  +<req:existscookie name="JSESSIONID">
  +   JSESSIONID=<req:cookie name="JSESSIONID"/>
  +</req:existscookie>
  +<req:existscookie name="JSESSIONID" value="false">
  +   Cookie JSESSIONID does not exist.
  +</req:existscookie>
  +
   HTTP Headers received with request:
   
   <req:headers id="hdrs">
      <jsp:getProperty name="hdrs" property="name"/> = <jsp:getProperty name="hdrs"
property="header"/>
   </req:headers>
   
  +See if User-Agent Header exists
  +<req:existsheader name="User-Agent">
  +   User-Agent=<req:header name="User-Agent"/>
  +</req:existsheader>
  +<req:existsheader name="User-Agent" value="false">
  +   Header User-Agent does not exist.
  +</req:existsheader>
  +
   GET or POST Parameters received with request:
   
   <req:parameters id="param">
  @@ -45,6 +61,39 @@
      <jsp:getProperty name="pv" property="name"/> = <jsp:getProperty name="pv" property="parameter"/>
    </req:parametervalues>
   </req:parameters>
  +
  +See if test1 parameter exists
  +<req:existsparameter name="test1">
  +   test1=<req:parameter name="test1"/>
  +</req:existsparameter>
  +<req:existsparameter name="test1" value="false">
  +   Parameter test1 does not exist.
  +</req:existsparameter>
  +
  +Set an attribute named "myatt"
  +<req:setattribute name="myatt">1234567</req:setattribute>
  +See if myatt attribute exists
  +<req:existsattribute name="myatt">
  +   myatt=<req:attribute name="myatt"/>
  +</req:existsattribute>
  +<req:existsattribute name="myatt" value="false">
  +   Attribute myatt does not exist.
  +</req:existsattribute>
  +Set an attribute named "myatt2" to the Header User-agent
  +<req:setattribute name="myatt2"><req:header name="User-Agent"/></req:setattribute>
  +Now loop through all the attributes
  +<req:attributes id="att">
  +   <jsp:getProperty name="att" property="name"/> = <jsp:getProperty name="att"
property="attribute"/>
  +</req:attributes>
  +Now remove the attribute myatt
  +<req:removeattribute name="myatt"/>
  +See if myatt attribute exists
  +<req:existsattribute name="myatt">
  +   myatt=<req:attribute name="myatt"/>
  +</req:existsattribute>
  +<req:existsattribute name="myatt" value="false">
  +   Attribute myatt does not exist.              
  +</req:existsattribute>
   
   <req:request id="rq"/>
   Request Information:
  
  
  

Mime
View raw message