cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rica...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp/library XSPResponseLibrary.java
Date Sun, 09 Jan 2000 02:47:21 GMT
ricardo     00/01/08 18:47:21

  Modified:    src/org/apache/cocoon/processor/xsp/library
                        XSPResponseLibrary.java
  Log:
  Added Servlet 2.2 methods. Made all methods static
  
  Revision  Changes    Path
  1.3       +4 -10     xml-cocoon/src/org/apache/cocoon/processor/xsp/library/XSPResponseLibrary.java
  
  Index: XSPResponseLibrary.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/XSPResponseLibrary.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSPResponseLibrary.java	2000/01/05 19:37:53	1.2
  +++ XSPResponseLibrary.java	2000/01/09 02:47:21	1.3
  @@ -66,14 +66,12 @@
   
   public class XSPResponseLibrary {
     // ServletResponse
  -  public Element getCharacterEncoding(HttpServletResponse response, Document document)
{
  +  public static Element getCharacterEncoding(HttpServletResponse response, Document document)
{
       Element element = document.createElement("response:get-character-encoding");
       element.appendChild(document.createTextNode(response.getCharacterEncoding()));
       return element;
     }
   
  -  // Not supported by JSDK versions prior to 2.2
  -  /*
     public static Element getLocale(HttpServletResponse response, Document document) {
       Element property = null;
       Locale locale = response.getLocale();
  @@ -93,11 +91,8 @@
   
       return element;
     }
  -  */
   
     // HttpServletResponse
  -  // Not supported by JSDK versions prior to 2.2
  -  /*
     public static void addDateHeader(HttpServletResponse response, String name, long date)
{
       response.addDateHeader(name, date);
     }
  @@ -117,21 +112,20 @@
     public static void addDateHeader(HttpServletResponse response, String name, String date,
DateFormat format) throws ParseException {
       response.addDateHeader(name, format.parse(date).getTime());
     }
  -  */
   
  -  public Element containsHeader(HttpServletResponse response, String name, Document document)
{
  +  public static Element containsHeader(HttpServletResponse response, String name, Document
document) {
       Element element = document.createElement("response:contains-header");
       element.appendChild(document.createTextNode(String.valueOf(response.containsHeader(name))));
       return element;
     }
   
  -  public Element encodeRedirectURL(HttpServletResponse response, String url, Document document)
{
  +  public static Element encodeRedirectURL(HttpServletResponse response, String url, Document
document) {
       Element element = document.createElement("response:encode-redirect-url");
       element.appendChild(document.createTextNode(response.encodeRedirectURL(url)));
       return element;
     }
   
  -  public Element encodeURL(HttpServletResponse response, String url, Document document)
{
  +  public static Element encodeURL(HttpServletResponse response, String url, Document document)
{
       Element element = document.createElement("response:encode-url");
       element.appendChild(document.createTextNode(response.encodeURL(url)));
       return element;
  
  
  

Mime
View raw message