Hi All 

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"/>
&#160;<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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to