cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/docs/samples/xsp cacheable.xsp cookie.xsp
Date Thu, 07 Feb 2002 03:49:51 GMT
vgritsenko    02/02/06 19:49:51

  Modified:    src/webapp/docs/samples/xsp cacheable.xsp cookie.xsp
  Log:
  samples fixes
  
  Revision  Changes    Path
  1.4       +1 -1      xml-cocoon2/src/webapp/docs/samples/xsp/cacheable.xsp
  
  Index: cacheable.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/xsp/cacheable.xsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- cacheable.xsp	6 Feb 2002 01:25:32 -0000	1.3
  +++ cacheable.xsp	7 Feb 2002 03:49:51 -0000	1.4
  @@ -22,7 +22,7 @@
       public long generateKey()
       {
           // Generate unique key; add parameters' values here
  -        return HashUtil.hash(request.getParameter("param"));
  +        return HashUtil.hash("" + request.getParameter("param"));
       }
       
       /**
  
  
  
  1.2       +149 -169  xml-cocoon2/src/webapp/docs/samples/xsp/cookie.xsp
  
  Index: cookie.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/xsp/cookie.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cookie.xsp	3 Jan 2002 12:31:42 -0000	1.1
  +++ cookie.xsp	7 Feb 2002 03:49:51 -0000	1.2
  @@ -1,172 +1,152 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
   
  -<xsp:page
  -	  language="java"
  -	  xmlns:xsp="http://apache.org/xsp"
  -	  xmlns:xsp-cookie="http://apache.org/xsp/cookie/2.0"
  -	  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  ->
  -	
  -	<xsp:structure>
  -		<xsp:include>org.apache.cocoon.environment.Cookie</xsp:include>		
  -	</xsp:structure>
  -	
  -	<page>
  -	
  -		<title>COOKIE LOGIC SHEET TEST1</title>
  -		
  -		<br>Trying to generate a cookie with name=testname, value=testvalue, maxage=10
years </br>
  -		<xsp:logic>
  -			String testname = "testname";
  -			String testvalue = "testvalue";			
  -		</xsp:logic>
  -				
  -		<xsp-cookie:cookie>
  -			<xsp-cookie:name><xsp:expr>testname</xsp:expr></xsp-cookie:name>
  -			<xsp-cookie:value><xsp:expr>testvalue</xsp:expr></xsp-cookie:value>
  -			<xsp-cookie:setMaxAge>10*365*24*60*60</xsp-cookie:setMaxAge>
  -		</xsp-cookie:cookie>						
  -		
  -		<br>Cookie Generated</br>
  -		
  -		<br>***********</br>
  -		<br> Cookies as XML </br>
  -			<xsp-cookie:getCookies as="xml"/>
  -		<br>***********</br>
  -		
  -		<br> Single cookie as XML (using "name" attribute) </br>			
  -			<xsp-cookie:getCookie as="xml" name="testname"/>
  -		<br>***********</br>
  -		
  -		<br> Single cookie as XML (using "index" attribute) </br>			
  -			<xsp-cookie:getCookie as="xml" index="0"/>
  -		<br>***********</br>
  -		
  -		<br> Name of cookie by using index </br>
  -			<xsp:logic>
  -				String name = <xsp-cookie:getName index="0"/>;
  -			</xsp:logic>
  -			
  -			<cookiename><xsp:expr>name</xsp:expr></cookiename>
  -		<br>***********</br>
  -		
  -		<br> Comment of cookie by using name </br>
  -			<xsp:logic>
  -				String commentbyname = <xsp-cookie:getComment name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookiecommentname><xsp:expr>commentbyname</xsp:expr></cookiecommentname>
  -		<br>***********</br>
  -		
  -		<br> Comment of cookie by using index </br>
  -			<xsp:logic>
  -				String commentbyindex = <xsp-cookie:getComment index="0"/>;
  -			</xsp:logic>
  -
  -			<cookiecommentindex><xsp:expr>commentbyindex</xsp:expr></cookiecommentindex>
  -		<br>***********</br>
  -		
  -		<br> Domain of cookie by using name </br>
  -			<xsp:logic>
  -				String domainbyname = <xsp-cookie:getDomain name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookiedomainname><xsp:expr>domainbyname</xsp:expr></cookiedomainname>
  -		<br>***********</br>
  -
  -		<br> Domain of cookie by using index </br>
  -			<xsp:logic>
  -				String domainbyindex = <xsp-cookie:getDomain index="0"/>;
  -			</xsp:logic>
  -
  -			<cookiedomainindex><xsp:expr>domainbyindex</xsp:expr></cookiedomainindex>
  -		<br>***********</br>
  -		
  -		<br> MaxAge of cookie by using name </br>
  -			<xsp:logic>
  -				String maxagebyname = <xsp-cookie:getMaxAge name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookiemaxagename><xsp:expr>maxagebyname</xsp:expr></cookiemaxagename>
  -		<br>***********</br>
  -
  -		<br> MaxAge of cookie by using index </br>
  -			<xsp:logic>
  -				String maxagebyindex = <xsp-cookie:getMaxAge index="0"/>;
  -			</xsp:logic>
  -
  -			<cookiemaxageindex><xsp:expr>maxagebyindex</xsp:expr></cookiemaxageindex>
  -		<br>***********</br>
  -		
  -		<br> Path of cookie by using name </br>
  -			<xsp:logic>
  -				String pathbyname = <xsp-cookie:getPath name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookiepathname><xsp:expr>pathbyname</xsp:expr></cookiepathname>
  -		<br>***********</br>
  -
  -		<br> Path of cookie by using index </br>
  -			<xsp:logic>
  -				String pathbyindex = <xsp-cookie:getPath index="0"/>;
  -			</xsp:logic>
  -
  -			<cookiepathindex><xsp:expr>pathbyindex</xsp:expr></cookiepathindex>
  -		<br>***********</br>
  -		
  -		<br> Secure of cookie by using name </br>
  -			<xsp:logic>
  -				String securebyname = <xsp-cookie:getSecure name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookiesecurename><xsp:expr>securebyname</xsp:expr></cookiesecurename>
  -		<br>***********</br>
  -
  -		<br> Secure of cookie by using index </br>
  -			<xsp:logic>
  -				String securebyindex = <xsp-cookie:getSecure index="0"/>;
  -			</xsp:logic>
  -
  -			<cookiesecureindex><xsp:expr>securebyindex</xsp:expr></cookiesecureindex>
  -		<br>***********</br>
  -
  -		<br> Value of cookie by using name </br>
  -			<xsp:logic>
  -				String valuebyname = <xsp-cookie:getValue name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookievaluename><xsp:expr>valuebyname</xsp:expr></cookievaluename>
  -		<br>***********</br>
  -
  -		<br> Value of cookie by using index </br>
  -			<xsp:logic>
  -				String valuebyindex = <xsp-cookie:getValue index="0"/>;
  -			</xsp:logic>
  -
  -			<cookievalueindex><xsp:expr>valuebyindex</xsp:expr></cookievalueindex>
  -		<br>***********</br>
  -		
  -		
  -		<br> Version of cookie by using name </br>
  -			<xsp:logic>
  -				String versionbyname = <xsp-cookie:getVersion name="testname"/>;
  -			</xsp:logic>
  -
  -			<cookievaluename><xsp:expr>versionbyname</xsp:expr></cookievaluename>
  -		<br>***********</br>
  -
  -		<br> Value of cookie by using index </br>
  -			<xsp:logic>
  -				String versionbyindex = <xsp-cookie:getVersion index="0"/>;
  -			</xsp:logic>
  -
  -			<cookievalueindex><xsp:expr>versionbyindex</xsp:expr></cookievalueindex>
  -		<br>***********</br>
  -		
  -		<xsp:logic>
  -			Cookie cookie = <xsp-cookie:getCookie name="testname1"/>;
  -		</xsp:logic>	
  -		
  -	</page>		
  -	
  +<xsp:page language="java"
  +        xmlns:xsp="http://apache.org/xsp"
  +        xmlns:xsp-cookie="http://apache.org/xsp/cookie/2.0"
  +        xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  +  
  +  <xsp:structure>
  +    <xsp:include>org.apache.cocoon.environment.Cookie</xsp:include>    
  +  </xsp:structure>
  +  
  +  <page>
  +    <title>COOKIE LOGIC SHEET TEST1</title>
  +    
  +    <br>Trying to generate a cookie with name=testname, value=testvalue, maxage=10
years </br>
  +    <xsp:logic>
  +      String testname = "testname";
  +      String testvalue = "testvalue";      
  +    </xsp:logic>
  +        
  +    <xsp-cookie:cookie>
  +      <xsp-cookie:name><xsp:expr>testname</xsp:expr></xsp-cookie:name>
  +      <xsp-cookie:value><xsp:expr>testvalue</xsp:expr></xsp-cookie:value>
  +      <xsp-cookie:setMaxAge><xsp:expr>10*365*24*60*60</xsp:expr></xsp-cookie:setMaxAge>
  +    </xsp-cookie:cookie>            
  +    
  +    <br>Cookie Generated</br>
  +    
  +    <br>***********</br>
  +    <br> Cookies as XML </br>
  +      <xsp-cookie:getCookies as="xml"/>
  +    <br>***********</br>
  +    
  +    <br> Single cookie as XML (using "name" attribute) </br>      
  +      <xsp-cookie:getCookie as="xml" name="testname"/>
  +    <br>***********</br>
  +    
  +    <br> Single cookie as XML (using "index" attribute) </br>      
  +      <textarea cols="60" rows="8"><xsp-cookie:getCookie as="xml" index="0"/></textarea>
  +    <br>***********</br>
  +    
  +    <br> Name of cookie by using index </br>
  +      <xsp:logic>
  +        String name = <xsp-cookie:getName index="0"/>;
  +      </xsp:logic>
  +      <cookiename><xsp:expr>name</xsp:expr></cookiename>
  +    <br>***********</br>
  +    
  +    <br> Comment of cookie by using name </br>
  +      <xsp:logic>
  +        String commentbyname = <xsp-cookie:getComment name="testname"/>;
  +      </xsp:logic>
  +      <cookiecommentname><xsp:expr>commentbyname</xsp:expr></cookiecommentname>
  +    <br>***********</br>
  +    
  +    <br> Comment of cookie by using index </br>
  +      <xsp:logic>
  +        String commentbyindex = <xsp-cookie:getComment index="0"/>;
  +      </xsp:logic>
  +      <cookiecommentindex><xsp:expr>commentbyindex</xsp:expr></cookiecommentindex>
  +    <br>***********</br>
  +    
  +    <br> Domain of cookie by using name </br>
  +      <xsp:logic>
  +        String domainbyname = <xsp-cookie:getDomain name="testname"/>;
  +      </xsp:logic>
  +      <cookiedomainname><xsp:expr>domainbyname</xsp:expr></cookiedomainname>
  +    <br>***********</br>
  +
  +    <br> Domain of cookie by using index </br>
  +      <xsp:logic>
  +        String domainbyindex = <xsp-cookie:getDomain index="0"/>;
  +      </xsp:logic>
  +      <cookiedomainindex><xsp:expr>domainbyindex</xsp:expr></cookiedomainindex>
  +    <br>***********</br>
  +    
  +    <br> MaxAge of cookie by using name </br>
  +      <xsp:logic>
  +        String maxagebyname = <xsp-cookie:getMaxAge name="testname"/>;
  +      </xsp:logic>
  +      <cookiemaxagename><xsp:expr>maxagebyname</xsp:expr></cookiemaxagename>
  +    <br>***********</br>
  +
  +    <br> MaxAge of cookie by using index </br>
  +      <xsp:logic>
  +        String maxagebyindex = <xsp-cookie:getMaxAge index="0"/>;
  +      </xsp:logic>
  +      <cookiemaxageindex><xsp:expr>maxagebyindex</xsp:expr></cookiemaxageindex>
  +    <br>***********</br>
  +    
  +    <br> Path of cookie by using name </br>
  +      <xsp:logic>
  +        String pathbyname = <xsp-cookie:getPath name="testname"/>;
  +      </xsp:logic>
  +      <cookiepathname><xsp:expr>pathbyname</xsp:expr></cookiepathname>
  +    <br>***********</br>
  +
  +    <br> Path of cookie by using index </br>
  +      <xsp:logic>
  +        String pathbyindex = <xsp-cookie:getPath index="0"/>;
  +      </xsp:logic>
  +      <cookiepathindex><xsp:expr>pathbyindex</xsp:expr></cookiepathindex>
  +    <br>***********</br>
  +    
  +    <br> Secure of cookie by using name </br>
  +      <xsp:logic>
  +        String securebyname = <xsp-cookie:getSecure name="testname"/>;
  +      </xsp:logic>
  +      <cookiesecurename><xsp:expr>securebyname</xsp:expr></cookiesecurename>
  +    <br>***********</br>
  +
  +    <br> Secure of cookie by using index </br>
  +      <xsp:logic>
  +        String securebyindex = <xsp-cookie:getSecure index="0"/>;
  +      </xsp:logic>
  +      <cookiesecureindex><xsp:expr>securebyindex</xsp:expr></cookiesecureindex>
  +    <br>***********</br>
  +
  +    <br> Value of cookie by using name </br>
  +      <xsp:logic>
  +        String valuebyname = <xsp-cookie:getValue name="testname"/>;
  +      </xsp:logic>
  +      <cookievaluename><xsp:expr>valuebyname</xsp:expr></cookievaluename>
  +    <br>***********</br>
  +
  +    <br> Value of cookie by using index </br>
  +      <xsp:logic>
  +        String valuebyindex = <xsp-cookie:getValue index="0"/>;
  +      </xsp:logic>
  +      <cookievalueindex><xsp:expr>valuebyindex</xsp:expr></cookievalueindex>
  +    <br>***********</br>
  +    
  +    <br> Version of cookie by using name </br>
  +      <xsp:logic>
  +        String versionbyname = <xsp-cookie:getVersion name="testname"/>;
  +      </xsp:logic>
  +      <cookievaluename><xsp:expr>versionbyname</xsp:expr></cookievaluename>
  +    <br>***********</br>
  +
  +    <br> Value of cookie by using index </br>
  +      <xsp:logic>
  +        String versionbyindex = <xsp-cookie:getVersion index="0"/>;
  +      </xsp:logic>
  +      <cookievalueindex><xsp:expr>versionbyindex</xsp:expr></cookievalueindex>
  +    <br>***********</br>
  +
  +    <xsp:logic>
  +      Cookie cookie = <xsp-cookie:getCookie name="testname1"/>;
  +    </xsp:logic>
  +
  +  </page>
   </xsp:page>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message