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-js response.xsp
Date Mon, 11 Feb 2002 04:50:29 GMT
vgritsenko    02/02/10 20:50:29

  Modified:    src/webapp/docs/samples sample-xsp.xml
  Added:       src/webapp/docs/samples/xsp response.xsp
               src/webapp/docs/samples/xsp-js response.xsp
  Log:
  Add response logicsheet test
  
  Revision  Changes    Path
  1.2       +10 -4     xml-cocoon2/src/webapp/docs/samples/sample-xsp.xml
  
  Index: sample-xsp.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/sample-xsp.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sample-xsp.xml	9 Feb 2002 06:21:57 -0000	1.1
  +++ sample-xsp.xml	11 Feb 2002 04:50:28 -0000	1.2
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
   
  -<!-- CVS: $Id: sample-xsp.xml,v 1.1 2002/02/09 06:21:57 vgritsenko Exp $ -->
  +<!-- CVS: $Id: sample-xsp.xml,v 1.2 2002/02/11 04:50:28 vgritsenko Exp $ -->
   
   <samples xmlns:xlink="http://www.w3.org/1999/xlink">
   
  @@ -54,6 +54,9 @@
      <sample name="Request" href="xsp/request" xlink:role="dynamic">
       Request logicsheet tests.
      </sample>
  +   <sample name="Response" href="xsp/response" xlink:role="dynamic">
  +    Response logicsheet tests.
  +   </sample>
      <sample name="Cookie" href="xsp/cookie" xlink:role="dynamic">
       Cookies logicsheet tests.
      </sample>
  @@ -63,11 +66,14 @@
      <sample name="Hello" href="xsp-js/hello">
       Hello in Javascript
      </sample>
  -   <sample name="Request" href="xsp-js/request" xlink:role="dynamic">
  -    Request logicsheet tests - same as before, but translated into Javascript.
  -   </sample>
      <sample name="Simple" href="xsp-js/simple" xlink:role="dynamic">
       Another simple XSP example.
  +   </sample>
  +   <sample name="Request" href="xsp-js/request" xlink:role="dynamic">
  +    Request logicsheet tests - same as before, but in Javascript.
  +   </sample>
  +   <sample name="Response" href="xsp-js/response" xlink:role="dynamic">
  +    Response logicsheet tests - same as before, but in Javascript.
      </sample>
     </group>
   </samples>
  
  
  
  1.1                  xml-cocoon2/src/webapp/docs/samples/xsp/response.xsp
  
  Index: response.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <!-- CVS: $Id: response.xsp,v 1.1 2002/02/11 04:50:29 vgritsenko Exp $ -->
  
  <xsp:page language="java"
            xmlns:xsp="http://apache.org/xsp"  
            xmlns:xsp-response="http://apache.org/xsp/response/2.0">
  
  <page>
  
  <h1>xsp-response logicsheet output</h1>
  <table border="1">
  <tr>
    <th>Logicsheet tag</th><th>Output</th><th>Java method</th><th>Output</th></tr>
  <tr>
    <td>get-character-encoding</td><td><xsp-response:get-character-encoding/></td>
    <td>getCharacterEncoding</td><td><xsp:expr>response.getCharacterEncoding()</xsp:expr></td>
      </tr>
  <tr>
    <td>get-locale</td><td><xsp-response:get-locale/></td>
    <td>getLocale</td><td><xsp:expr>response.getLocale()</xsp:expr></td>
      </tr>
  <tr>
    <td>set-locale to GERMANY</td><td>
      <xsp-response:set-locale><xsp:expr>java.util.Locale.GERMANY</xsp:expr></xsp-response:set-locale>
        </td>
      </tr>
  <tr>
    <td>get-locale</td><td><xsp-response:get-locale/></td>
    <td>getLocale</td><td><xsp:expr>response.getLocale()</xsp:expr></td>
      </tr>
  
  <xsp-response:set-locale><xsp:expr>java.util.Locale.getDefault()</xsp:expr></xsp-response:set-locale>
  
  <tr>
    <td>add-date-header</td><td>
      <xsp-response:add-date-header name="X-Cocoon-Date">
        <xsp-response:date><xsp:expr>new Date()</xsp:expr></xsp-response:date>
          </xsp-response:add-date-header></td>
    <td>addDateHeader</td><td><xsp:logic>response.addDateHeader("X-Java-Date",
System.currentTimeMillis());</xsp:logic></td>
      </tr>
  
  <tr>
    <td>add-header</td><td>
      <xsp-response:add-header name="X-Cocoon-Header" value="Value!"/>
        </td>
    <td>addHeader</td><td><xsp:logic>response.addHeader("X-Java-Header",
"Value!");</xsp:logic></td>
      </tr>
  
  <tr>
    <td>add-int-header</td><td>
      <xsp-response:add-int-header name="X-Cocoon-Int">
        <xsp-response:value><xsp:expr>5</xsp:expr></xsp-response:value>
          </xsp-response:add-int-header></td>
    <td>addIntHeader</td><td><xsp:logic>response.addIntHeader("X-Java-Int",
5);</xsp:logic></td>
      </tr>
  
  <tr>
    <td>contains-header</td><td>
      <xsp-response:contains-header name="X-Cocoon-Header"/>
        </td>
    <td>containsHeader</td><td><xsp:expr>response.containsHeader("X-Java-Header")</xsp:expr></td>
      </tr>
  
  <tr>
    <td>encode-url</td><td>
      <xsp-response:encode-url url="http://localhost:8080/cocoon/welcome"/>
        </td>
    <td>encodeURL</td><td><xsp:expr>response.encodeURL("http://localhost:8080/cocoon/welcome")</xsp:expr></td>
      </tr>
  <!--
  xsp-response:add-cookie
  xsp-response:set-date-header
  xsp-response:set-header
  xsp-response:set-int-header
  -->
  </table>
  
  	<h1>xsp-response logicsheet output (as xml)</h1>
  <textarea cols="100" rows="12">
  get-character-encoding      <xsp-response:get-character-encoding as="xml"/>
  get-locale                  <xsp-response:get-locale as="xml"/>
  contains-header             <xsp-response:contains-header name="X-Cocoon-Header" as="xml"/>
  encode-url                  <xsp-response:encode-url url="http://localhost:8080/cocoon/welcome"
as="xml"/>
  </textarea>
  
  </page>
  </xsp:page>
  
  
  
  1.1                  xml-cocoon2/src/webapp/docs/samples/xsp-js/response.xsp
  
  Index: response.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <!-- CVS: $Id: response.xsp,v 1.1 2002/02/11 04:50:29 vgritsenko Exp $ -->
  
  <xsp:page language="javascript"
            xmlns:xsp="http://apache.org/xsp"  
            xmlns:xsp-response="http://apache.org/xsp/response/2.0">
  
  <page>
  
  <h1>xsp-response logicsheet output</h1>
  <table border="1">
  <tr>
    <th>Logicsheet tag</th><th>Output</th><th>Java method</th><th>Output</th></tr>
  <tr>
    <td>get-character-encoding</td><td><xsp-response:get-character-encoding/></td>
    <td>getCharacterEncoding</td><td><xsp:expr>response.getCharacterEncoding()</xsp:expr></td>
      </tr>
  <tr>
    <td>get-locale</td><td><xsp-response:get-locale/></td>
    <td>getLocale</td><td><xsp:expr>response.getLocale()</xsp:expr></td>
      </tr>
  <tr>
    <td>set-locale to GERMANY</td><td>
      <xsp-response:set-locale><xsp:expr>java.util.Locale.GERMANY</xsp:expr></xsp-response:set-locale>
        </td>
      </tr>
  <tr>
    <td>get-locale</td><td><xsp-response:get-locale/></td>
    <td>getLocale</td><td><xsp:expr>response.getLocale()</xsp:expr></td>
      </tr>
  
  <xsp-response:set-locale><xsp:expr>java.util.Locale.getDefault()</xsp:expr></xsp-response:set-locale>
  
  <tr>
    <td>add-date-header</td><td>
      <xsp-response:add-date-header name="X-Cocoon-Date">
        <xsp-response:date><xsp:expr>new java.util.Date()</xsp:expr></xsp-response:date>
          </xsp-response:add-date-header></td>
    <td>addDateHeader</td><td><xsp:logic>response.addDateHeader("X-Java-Date",
-1);</xsp:logic></td>
      </tr>
  
  <tr>
    <td>add-header</td><td>
      <xsp-response:add-header name="X-Cocoon-Header" value="Value!"/>
        </td>
    <td>addHeader</td><td><xsp:logic>response.addHeader("X-Java-Header",
"Value!");</xsp:logic></td>
      </tr>
  
  <tr>
    <td>add-int-header</td><td>
      <xsp-response:add-int-header name="X-Cocoon-Int">
        <xsp-response:value><xsp:expr>5</xsp:expr></xsp-response:value>
          </xsp-response:add-int-header></td>
    <td>addIntHeader</td><td><xsp:logic>response.addIntHeader("X-Java-Int",
5);</xsp:logic></td>
      </tr>
  
  <tr>
    <td>contains-header</td><td>
      <xsp-response:contains-header name="X-Cocoon-Header"/>
        </td>
    <td>containsHeader</td><td><xsp:expr>response.containsHeader("X-Java-Header")</xsp:expr></td>
      </tr>
  
  <tr>
    <td>encode-url</td><td>
      <xsp-response:encode-url url="http://localhost:8080/cocoon/welcome"/>
        </td>
    <td>encodeURL</td><td><xsp:expr>response.encodeURL("http://localhost:8080/cocoon/welcome")</xsp:expr></td>
      </tr>
  <!--
  xsp-response:add-cookie
  xsp-response:set-date-header
  xsp-response:set-header
  xsp-response:set-int-header
  -->
  </table>
  
  	<h1>xsp-response logicsheet output (as xml)</h1>
  <textarea cols="100" rows="12">
  get-character-encoding      <xsp-response:get-character-encoding as="xml"/>
  get-locale                  <xsp-response:get-locale as="xml"/>
  contains-header             <xsp-response:contains-header name="X-Cocoon-Header" as="xml"/>
  encode-url                  <xsp-response:encode-url url="http://localhost:8080/cocoon/welcome"
as="xml"/>
  </textarea>
  
  </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