Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get Content Type of CSV files in Struts

843841Oct 17 2005 — edited Aug 21 2008
Hi,
Im performing database insertions using CSV file in MySQL database in Struts Framework.

While uploading the file i need to check for the content type wheather its a CSV file...Im using FormFile in form for CSV file upload.

When i use the getContentType() method it returns me "application/octet-stream" for CSV files...How do i perform this file validation?

Please help me go about this.

Thanks in advance

Regds,
Gokul
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2008
Added on Oct 17 2005
2 comments
487 views