This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem download files from MySQL to jsp  RSS feed

 
alex bertez
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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..."
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!