File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Attachement in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Attachement in JSP" Watch "Attachement in JSP" New topic

Attachement in JSP

dinesh kumar

Joined: Sep 19, 2005
Posts: 7
How do i create attachment in my JSP page.
Can any one please help me out.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Use an input tag with "file" as the type on your JSP and then use Jakarta Commons File Upload to do all the dirty work.

GenRocket - Experts at Building Test Data
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

What do you mean by an attachment?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
dinesh kumar

Joined: Sep 19, 2005
Posts: 7
Hi greg and all

I am not getting much idea how to us Jakarta Commons File Upload .

what are the common fundas for uplaoding the file.and once i upload the
file where does the file gets stored so that the file can be downloaded again.
Please help me with some code examples.

Thank you,
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
commons fileupload userguide.
I agree. Here's the link:
subject: Attachement in JSP
It's not a secret anymore!