Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to open Excel File using JSP in Internet  RSS feed

 
Prem Mallavalli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I wrote a jsp that enables me to convert a resultset into an Excel file on clicking a button. It is coming good in my intranet using LAN. But the same thing when accessed through internet, it is showing me that the page cannot be displayed error page. The lines used are as follows:

response.setContentType("application/vnd.ms-excels; charset=us-ascii");
response.setHeader("Content-Transfer-Encoding", "7bit");
response.setHeader("Content-Disposition","attachment;filename=delivered.xls");

PrintWriter out1 = new PrintWriter(response.getOutputStream());

followed by the code to fetch the results and then followed by

out1.flush();

Kindly help me out with this problem.

It is working perfecly when used with in the intranet site.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that hints at a performance problem, leading to a timeout when used over a slower connection.
Or maybe there's a firewall which blocks the content type you generate.

Anyway, it's not something in your JSP.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!