actually, if this is a
web app, you'll likely want to use higher-level APIs corresponding to www/http concepts, rather than the raw sockets those are built on. look into the java.net package and its classes; the HttpURLConnection class looks promising to me.
if you're willing to go beyond Sun's basic API, then
Jakarta Commons looks like it might have a few useful classes. its FileUpload and HttpClient might do things you will want done, perhaps.