aspose file tools*
The moose likes JSP and the fly likes Creating a Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Creating a "BROWSE" button on JSP Page" Watch "Creating a "BROWSE" button on JSP Page" New topic
Author

Creating a "BROWSE" button on JSP Page

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1075
This is probably simple, but I can't find it in my books.

How do you create a "browse" button on a JSP page that lets the user select a file from his local file system?

Thanks in advance.

-- Mike
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

<input type="file" ....


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

If you need the form to work, see file upload forms

I always forget the enctype attribute in forms that have file uploads:
the form tag must have:
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1075
Thanks all!!!
 
wood burning stoves
 
subject: Creating a "BROWSE" button on JSP Page