You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by re...@apache.org on 2001/02/05 05:35:50 UTC

cvs commit: jakarta-slide build.xml

remm        01/02/04 20:35:50

  Modified:    .        build.xml
  Log:
  - The examples source code wasn't copied in the distribution.
  
  Revision  Changes    Path
  1.67      +0 -1      jakarta-slide/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/build.xml,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- build.xml	2001/02/04 04:45:34	1.66
  +++ build.xml	2001/02/05 04:35:50	1.67
  @@ -362,7 +362,6 @@
       <copy todir="${slide.build}/examples">
         <fileset dir="src/examples">
           <exclude name="**/CVS/**" />
  -        <exclude name="**/*.java" />
         </fileset>
       </copy>
     </target>
  
  
  

Correctly setting the query, XML document

Posted by "Park, Sung-Gu" <je...@thinkfree.com>.
We need to use the query XML document again in a cycle of WebdavClient.
If the request is required to set the authorization, the next following
request in a cycle must be same with the right before XML document.   For
example, except authorization, It occurs in Apache with mod_dav.  Because of
the cookie problem in Apache.  And it's considered for the condition,
propertyNames.hasMoreElements() in PropFindMethod is false, after the first
request.


WebdavMethodBase.java
========================
    /*
     * Holds the query body if set by setQuery.
     */
    protected String query = null;

<snip>

    public void recycle() {
+       query = null;

<snip>




 PropFindMethod.java
========================

    /**
     * Generate the query body.
     *
     * @return String query
     */
    public String generateQuery() {

        /*
         * If the query XML document is already  present,
         * we should use it.
         */
       if (query != null && !query.equals(""))
            return query;

        /*
         * Generate the query body.
         */
        WebdavXMLPrinter printer = new WebdavXMLPrinter();

<snip>
        printer.writeElement("D", "propfind", WebdavXMLPrinter.CLOSING);

+        query = printer.toString();
        if (debug > 1) {
            System.out.println("Request body:");
            System.out.println(query);
        }

+        return query;

PropPatchMethod.java
==================================
<snip>
    public String generateQuery() {

        /*
         * If the query XML document is already  present,
         * use it.
         */
+        if (query != null && !query.equals(""))
            return query;

        /*
         * Generate the query body.
         */
        WebdavXMLPrinter printer = new WebdavXMLPrinter();
<snip>
        printer.writeElement("D", "propertyupdate",
WebdavXMLPrinter.CLOSING);

        query = printer.toString();

+        return query;


LockMethod.java
====================
<snip>
    public String generateQuery() {

        /*
         * If the query XML document is already  present,
         * use it.
         */
        if (query != null && !query.equals(""))
            return query;

-        String result = null;
        /*
         * Generate the query body.
         */
        if (!isRefresh()) {

-                result = stringWriter.getBuffer().toString();
+                query = stringWriter.getBuffer().toString();
            } catch (DOMException e) {
            } catch (ParserConfigurationException e) {
            }
        }

-        return result;
+        return query;