Link to home
Start Free TrialLog in
Avatar of fishaque
fishaque

asked on

FILE UPLOADING USING JSP

hello
we want to creat file upload module using JSP/Servlets API.
We only allow TXT type files to be uploaded through this module.
There are about 200 trusted clients will access this module to upload
there information that will be stored in DataBase after some validations.

We have face some problems that are given bellow.

Can we track file type before sending it to server?
      ie. Rec.doc rename to Rec.txt, should not upload.

Can we track file contents to be uploaded are non harmfull?
      i.e Rec.exe or Rec.dll rename as Rec.txt and upload it.
Can we use anti virus tools using java?

regards,
Faisal
Avatar of fargo
fargo

use commons fileupload
http://jakarta.apache.org/commons/fileupload/

u can have restrictions on the type of file to be uploaded to the server.(.exe...etc)
For .txt file, u can also make some server side validation to check the extension.

ASKER CERTIFIED SOLUTION
Avatar of fargo
fargo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial