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 / October 2006

Tip: Looking for answers? Try searching our database.

Uploading files to a website using Java Servlets

Thread view: 
jonesy - 12 Oct 2006 03:58 GMT
Has anyone written a class where data can be entered into forms in a
browser and then transferred to a database?  Also, files need to be
uploaded directly to the website's public_html directory.

If would be great if anyone had some sample code that I could play
around with.

I'm using Java Servlets, ODBC and weblogic.

I've only had a few months programming experience, any advice/help/code
is much appreciated.  Thanks.

:)
Simon Brooke - 12 Oct 2006 10:03 GMT
> Has anyone written a class where data can be entered into forms in a
> browser and then transferred to a database?  Also, files need to be
> uploaded directly to the website's public_html directory.

Yes.

http://www.weft.co.uk/library/jacquard/

Specifically
http://www.weft.co.uk/library/jacquard/documentation/uk/co/weft/maybeupload/Mayb
eUploadServlet.html


which is deliberately plug compatible with javax.servlet.http.HttpServlet.

If you only need the file upload stuff and not the rest of the toolkit,
download the source tarball from

http://www.weft.co.uk/library/jacquard/download/jacquard-1.10.14.tar.gz

unpack it, and run 'ant jar'; you'll then find a file
maybeupload-[version].jar in the build/lib subdirectory. Copy this into
the WEB-INF/lib subdirectory of your webapp and Robert's your father's
brother.

Any problems, mail me; the address is valid.

Signature

simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
       Windows 95:
               You, you, you! You make a grown man cry...
                                               M. Jagger/K. Richards

Joe Attardi - 12 Oct 2006 18:52 GMT
> Has anyone written a class where data can be entered into forms in a
> browser and then transferred to a database?  Also, files need to be
> uploaded directly to the website's public_html directory.

Another very good file upload package is Jakarta Commons-FileUpload,
found at:
http://jakarta.apache.org/commons/fileupload/

Signature

Joe Attardi
jattardi@gmail.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.