RE: [JBoss-user] Passing an InputStream to an EJB

2002-02-19 Thread Ivan Bolcina
Title: RE: [JBoss-user] Passing an InputStream to an EJB





Doesn't the whole InputStream get serializated before send - I mean in array? Why dont you just send array,maybe compressed? For large files, I would use either ftp or oreilly com package.

By


-Original Message-
From: Andrea Cervellati [mailto:[EMAIL PROTECTED]] 
Sent: 18. februar 2002 15:10
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Passing an InputStream to an EJB


Hi,


I'm using JBoss 2.4.3-Tomcat 4.0 and I have a web app that allows users to 
upload files to the server.


I have a servlet that takes the multipart form data request from the client with 
one file and a text description of it.
I'm using the O'Reilly pack to menage the parts of the request.


The name and the description are sent as String along with an InputStream of the 
file to an ejb that takes care of the storing.


The problem is that if I pass an InputStream the file is not stored correctly. 
For example a MS Word document sent from the client is stored in a strange 
manner (something like a maker file).
If I send a FileInputStream the file is stored correctly, and I have no problem.
But I want the ejb takes care of the storing, not the servlet, and if I use a 
FileInputStream I need to temporally save the stream to a file (this is a very 
ugly solution!).


Can someone tell me why is it happening and how can I do to fix the problem?


Thanks in advance



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





Re: [JBoss-user] Passing an InputStream to an EJB

2002-02-19 Thread Peter Levart

See the discussion in the thread with subject Streams on this list (from 
about a week ago). It might be related to your problem...

Peter


On Monday 18 February 2002 15:10, Andrea Cervellati wrote:
 Hi,

 I'm using JBoss 2.4.3-Tomcat 4.0 and I have a web app that allows users to
 upload files to the server.

 I have a servlet that takes the multipart form data request from the client
 with one file and a text description of it.
 I'm using the O'Reilly pack to menage the parts of the request.

 The name and the description are sent as String along with an InputStream
 of the file to an ejb that takes care of the storing.

 The problem is that if I pass an InputStream the file is not stored
 correctly. For example a MS Word document sent from the client is stored in
 a strange manner (something like a maker file).
 If I send a FileInputStream the file is stored correctly, and I have no
 problem. But I want the ejb takes care of the storing, not the servlet, and
 if I use a FileInputStream I need to temporally save the stream to a file
 (this is a very ugly solution!).

 Can someone tell me why is it happening and how can I do to fix the
 problem?

 Thanks in advance


 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Passing an InputStream to an EJB

2002-02-18 Thread Andrea Cervellati

Hi,

I'm using JBoss 2.4.3-Tomcat 4.0 and I have a web app that allows users to 
upload files to the server.

I have a servlet that takes the multipart form data request from the client with 
one file and a text description of it.
I'm using the O'Reilly pack to menage the parts of the request.

The name and the description are sent as String along with an InputStream of the 
file to an ejb that takes care of the storing.

The problem is that if I pass an InputStream the file is not stored correctly. 
For example a MS Word document sent from the client is stored in a strange 
manner (something like a maker file).
If I send a FileInputStream the file is stored correctly, and I have no problem.
But I want the ejb takes care of the storing, not the servlet, and if I use a 
FileInputStream I need to temporally save the stream to a file (this is a very 
ugly solution!).

Can someone tell me why is it happening and how can I do to fix the problem?

Thanks in advance


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user