cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch ku <gajch...@yahoo.com>
Subject Re: Problem uploading an file from desktop. Is it a bug or I am implementing it incorrectly ?
Date Mon, 09 Sep 2002 00:44:57 GMT
Hi All

Please help. Is this a  bug with cocoon2.0.3 or am I
implementing it wrong way ?

 I am facing problem while uploading a file from
 desktop. 
 
 Here is xsl code.
 
 <form name="pg"
 action="/cocoon/email_alert/Read.xml"
 method="post" enctype="multipart/form-data">
           <td class="settings2">
    <input type="file" name="file_path"
 class="white"/>
  <input type="submit" name="file_action"
 value="Add" class="white"/>
           <input type="hidden" name="tt" value="tt"
 />
       </td>
     </form>
 
 Here is portion of Read.xml
 
 
 
  if (!(request.getParameter("tt") == null)) {
      faction = request.getParameter("Add");
      val = request.getParameter("file_path");
      try {
        System.out.println("%%%%%%%%%%%");
        FileInputStream n = new FileInputStream(val);
        z = n.available();
        if (z <![CDATA[>]]> 0) {
         b = new byte[z];
        }
        n.read(b);
        n_str = new String(b,"ISO8859_1");
     }
     catch(Exception e) {
 
        n_str = e.toString();
     }
   }
   System.out.println("THEEEEE");
  </xsp:logic>
  <disp><xsp:expr>displayString</xsp:expr></disp>
  <path><xsp:expr>n_str</xsp:expr></path>
 
 
 For cocoon2.0.1 code works fine but with cocoon
 2.0.3
 code throws an error 
 
 java.io.FileNotFoundException:

org.apache.cocoon.components.request.multipart.FilePartFile@406eb6
 (No such file or directory)
 
 Can anybody help me ?
 
 Thanks 
 chinmay
 
 
 
 
 
 
 
 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message