Hello, I am working on a project where I need to store images locally
on the server and references to them in Oracle10g. I need some help on
how to upload an image locally on the server from the client's machine.
I am using eclipse 3.2, tomcat 5.x and Oracle 10g.
Greetings,
A.D.
Andrew Thompson - 07 Sep 2006 11:05 GMT
> Hello, I am working on a project where I need to store images locally
> on the server and references to them in Oracle10g. I need some help on
> how to upload an image locally on the server from the client's machine.
Since you failed to ask a question, I'll ask one or two..
OK.. so does this mean you'd like us to recommend a
good consultant? Or would you perhaps prefer to launch
into some tutorials, try hacking out some code, and come
back to us with specific questions? Some, other form of
help, maybe?
Or did I miss your point? Were you just after words of
support for your coming endeavour?
Try - 'Go, Team!'.
Andrew T.
Matt Humphrey - 07 Sep 2006 12:03 GMT
> Hello, I am working on a project where I need to store images locally
> on the server and references to them in Oracle10g. I need some help on
> how to upload an image locally on the server from the client's machine.
>
> I am using eclipse 3.2, tomcat 5.x and Oracle 10g.
I take it (because you're using tomcat) that you're talking about a web
application and the client is a browser. In HTML there is a <input
type="file" name="uploadfile" /> tag for forms that allow users to select a
file for uploading. In a POST request the file contents is copied within the
servlet request--you just read it from the input stream. I can't seem to
lay my hands on sample code right now, but you can figure it out from the
servlet API. Some online source code for file update is here
http://www.oop-reserch.com/cross_servlet.html
There is some good info here
http://www.theserverside.com/tt/articles/article.tss?l=HttpClient_FileUpload
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/
Tom Cole - 07 Sep 2006 12:44 GMT
> > Hello, I am working on a project where I need to store images locally
> > on the server and references to them in Oracle10g. I need some help on
[quoted text clipped - 10 lines]
> servlet API. Some online source code for file update is here
> http://www.oop-reserch.com/cross_servlet.html
There are also two widely used, free libraries out there you can use to
read the files and other parameters from the stream for you:
Apache FileUpload: http://jakarta.apache.org/commons/fileupload/
O'reilly MultipartRequest: http://servlets.com/cos/
> There is some good info here
> http://www.theserverside.com/tt/articles/article.tss?l=HttpClient_FileUpload
>
> Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/