xlawrence    2005/12/12 19:00:29 CET

  Modified files:
    core/src/java/org/jahia/ajax AjaxAction.java 
  Log:
  just keeping things cosmetically consistent
  
  Revision  Changes    Path
  1.4       +9 -24     jahia/core/src/java/org/jahia/ajax/AjaxAction.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/ajax/AjaxAction.java.diff?r1=1.3&r2=1.4&f=h
  
  
  
  Index: AjaxAction.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/ajax/AjaxAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AjaxAction.java   12 Dec 2005 16:14:54 -0000      1.3
  +++ AjaxAction.java   12 Dec 2005 18:00:29 -0000      1.4
  @@ -54,7 +54,7 @@
    * request processing for AJAX calls. It contains utility methods and 1 
abstract method.
    *
    * @author Xavier Lawrence
  - * @version $Id: AjaxAction.java,v 1.3 2005/12/12 16:14:54 dpillot Exp $
  + * @version $Id: AjaxAction.java,v 1.4 2005/12/12 18:00:29 xlawrence Exp $
    */
   public abstract class AjaxAction extends Action {
   
  @@ -234,31 +234,20 @@
               buildXmlElement(buff, tagName, tagValue);
           }
   
  -        sendResponse(buff.toString(),response);
  -        /*
  -        logger.debug("Response:\n" + buff);
  -        final byte[] bytes = buff.toString().getBytes(CHARSET);
  -
  -        response.setContentType(XML_CONTENT);           // mandatory, do not 
remove !       (see AJAX spec)
  -        response.setHeader(CACHE_CONTROL, NO_CACHE);    // mandatory, do not 
remove !       (see AJAX spec)
  -        response.setContentLength(bytes.length);
  -        response.setStatus(HttpServletResponse.SC_OK);
  -
  -        final OutputStream out = response.getOutputStream();
  -        out.write(bytes);
  -        out.flush();
  -        */
  +        sendResponse(buff.toString(), response);
       }
   
       /**
  -     * raw method to send bytes from string
  +     * Raw method to send bytes from a String
  +     *
        * @param resp
        * @param response
        * @throws IOException
        */
  -    protected void sendResponse(String resp,HttpServletResponse response) 
throws IOException {
  -        logger.debug("Response:\n" + resp);
  -        byte[] bytes = resp.getBytes(CHARSET);
  +    protected final void sendResponse(final String resp,
  +                                      final HttpServletResponse response) 
throws IOException {
  +        //logger.debug("Response:\n" + resp);
  +        final byte[] bytes = resp.getBytes(CHARSET);
   
           response.setContentType(XML_CONTENT);           // mandatory, do not 
remove !       (see AJAX spec)
           response.setHeader(CACHE_CONTROL, NO_CACHE);    // mandatory, do not 
remove !       (see AJAX spec)
  @@ -287,11 +276,4 @@
                                             final HttpServletRequest request,
                                             final HttpServletResponse response)
               throws IOException, ServletException;
  -}
  -
  -/**
  - * $Log: AjaxAction.java,v $
  - * Revision 1.3  2005/12/12 16:14:54  dpillot
  - * added running info
  - *
  - */
  \ No newline at end of file
  +}
  \ No newline at end of file
  

Reply via email to