Uploading files to a website using Java Servlets

J

jonesy

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.

:)
 
S

Simon Brooke

jonesy said:
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/MaybeUploadServlet.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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top