Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

How to upload an image locally

Thread view: 
alexdobrev@gmail.com - 07 Sep 2006 09:26 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.

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/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.