• Post Reply Bookmark Topic Watch Topic
  • New Topic

opening in server system only

 
avinash narasingam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote a code in one system(server).if i am clicking on export to excel button result is getting displayed in excelformat
problem is when i opened the link and click the button in other system(client) its opening in server only..
in the code i have given
FileOutputStream fileOut = new FileOutputStream(C:/Intel/data.xls);
java.awt.Desktop.getDesktop().open(new java.io.File("C:/Intel/data.xls"));
is the path giving me problem
 
Tim Moores
Saloon Keeper
Posts: 3262
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course it's being opened on the server, because that's where the code runs. If you want the file to be available on the client you need to store it in a public place and give the client a link to it, or stream the file to the client.
 
avinash narasingam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i stream the file to the client
is it possible using jasper
can you suggest me some ways
 
Tim Moores
Saloon Keeper
Posts: 3262
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the SimpleStream example in http://www.coderanch.com/how-to/java/CodeBarnServlets.

Jasper just creates files; I don't think it has anything to do with serving or streaming them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!