perform "BROWSE" in jsp URGENT!!
1 posts in topic
Flat View  Flat View

Posted By:   jeanie_teo
Posted On:   Monday, June 10, 2002 12:25 AM

i wanna do a hyperlink to read a file from another folder. however it is very troublesome to type in the URL as there might be error in the typing.
some people suggest to me to use a LOOKUP which is like the BROWSE button we use. however how do i do it in my jsp coding?

Re: perform "BROWSE" in jsp URGENT!!

Posted By:   Yehonatan_Moses  
Posted On:   Tuesday, June 11, 2002 12:05 AM

OK , first of all u have to define your problem more clear.

do u want to upload a file?
becuase i didn't understand what u meant about BROWSE? .

if u wish to let your user upload a file u have to do the following steps.

  1. make a form in your jsp page

  2. the receving servlet (or jsp page) must read the InputStream of the file and parse the file.
    you can read the rfc about how to upload a file here

  3. you can use external java packages (since servlet 2.3 spec doesn't come with support for that )
    such as oreilly's upload file package.

  4. Start Uploading!!! :-)

p.s - you can't let the user enter a file name ,
         if don't think the protocol allows it. (security reasons.)

;         is that what you wanted ?

regards .
About | Sitemap | Contact