• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem while opening a CSV file using Internet Explorer  RSS feed

 
Rasath Umar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have code like this to open a PDF and text file in Internet explorer. Its working fine. Now I have to open a CSV file which is not works well with IE but works fine with Firefox.

String OpenFile = "rundll32 url.dll,FileProtocolHandler " + FileURL

Firefox is opening the file as an attachement for PDF or CSV file. But IE didn't.

In servlet we can use like this and you can place the code to open a new window.
response.setContentType="text/Comma Separated Values"

Is there any way to write an equal code like this in AWT/Swing?
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Starting in JDK6 you can use the Desktop class.
 
Rasath Umar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. But I need to use exactly JDK 1.5.0
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!