Hi,
I solved the problem by writing a separate class to parse
the ServletInputStream. It parses the stream for parameters
passed and raw stream data. Works ggggreat.
What I did was I put all the ins and outs of the servlet
in a separate class, -- I named it `FilePostHandler' --
and called the class in the servlet. No code has changed
from the servlet -- Just isolated the code from the servlet.
Then it works. I still wonder why it wasn't working.
Thanks.


> 
> Hello, folks! Happy new year!!!!!!!!!
> I wrote a servlet that uploads files to the server.
> The problem with the servlet is that it works but it takes too much time.
> I put a couple of print statements at the beginning of the servlet and at the end of
> the servlet
> for a debuging purpose. Both the print statements responded immediately and uploaded
> a file correctly.
> At the second upload, when I clicked on the upload button, nothing happended for a
> very long time and
> then started to print the two statements. The servlet part seems OK. The servlet
> itself is processed
> quickly enough as all the print statements prints almost at the same time. Now,,
> then what?
> Something must be taking process before the servlet call.
> 
> I searched the orionsupport pages and found a cool class specially designed for
> uploading files, which is
> com.evermind.io.PostFileInputStream. This appeared great for the first time, but it
> started giving
> me the `500 Internal Server Error' as follows:
> 
> 
> 500 Internal Server Error
> 
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.System.arraycopy(Native Method)
>         at com.evermind.io.PostFileInputStream.read(JAX)
>         at com.freightstream.servlet.FileUpload.writeOut(FileUpload.java:72)
>         at com.freightstream.servlet.FileUpload.service(FileUpload.java:48)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>         at com.evermind.server.http.d3.so(JAX)
>         at com.evermind.server.http.d3.sm(JAX)
>         at com.evermind.server.http.ef.su(JAX)
>         at com.evermind.server.http.ef.dn(JAX)
>         at com.evermind.util.f.run(JAX)
> 
> 
> 
> What am I doing wrong?  As usual, orion does not have much documentation on how to
> use the class.
> Please give me a clue. Any idea will help. Thanks a billion.
> 
> 
> 
> 


Reply via email to