• 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

PDF generation usubg iText sending to JSP

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

so basically I have created the PDF from iText
now I need it send it to the UI (jsp page)
What is the best way to do this?

Thank you,
<newbie>
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could store the file in a publicly accessible directory on the server, and then provide a link to it.

You can also stream the PDF to the client, but that's not going to work from a JSP, only from a servlet (which is where you should be doing any PDF generation anyway).
 
Yzut Lo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
You could store the file in a publicly accessible directory on the server, and then provide a link to it.

You can also stream the PDF to the client, but that's not going to work from a JSP, only from a servlet (which is where you should be doing any PDF generation anyway).




well as I have it now I have a java class pdfgen (creates the pdf).
and another class tha calls this pdfgen class that extends org.springframework.web.servlet.mvc.SimpleFormController
Then I have a servlet.xml using spring to map everything together.
In theory the web.xml will help me link the jsp page to the SimpleFormController..
Is this a bad approach? is my understanding correct about the technologies involved?

Many thanks,
<newbie>
reply
    Bookmark Topic Watch Topic
  • New Topic