• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

problem download files from MySQL to jsp

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i run the jsp in eclipce i get the file from the sgbd but when i run it in chrom or firefox i get this page with caracter like this "%PDF-1.4 %���� 6847 0 obj <> endobj xref 6847 32 0000000016 00000 n 0000001630 00000 n 0000001879 00000 n 0000002220 00000 n 0000002858 00000 n 0000003625 00000 n 0000004167 00000 n 0000004308 00000 n..."
 
author & internet detective
Posts: 42162
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alex,
Welcome to CodeRanch!

Most people would use a Servlet for this rather than a JSP since you aren't creating the content with a template. Regardless, you need to set the content type to PDF so the browser knows this isn't HTML content. You can see examples here. Right now, you are getting a mess of binary, because the browser is trying to display it as text.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic