• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Not able to open Excel File using JSP in Internet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic