• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic