Announcement Announcement Module
Collapse
No announcement yet.
Controller and OutputStream Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Controller and OutputStream

    Hi,

    I want to show after passing in my controller a pdf, png, gif or jpeg file create using itext/jfreegraph in my controller.

    What is the best way ?

    Is it possible to return a stream instead of a view ? Must i use a simple servlet instead but in that case can i use my managers ?

    Thanks,

    Fabien.

  • #2
    Check the "countries" sample application. There is a good exemple of using the pdf view.

    Comment


    • #3
      If you're doing something unusual for which no view (custom or out-of-the-box) is appropriate, you can return null from your Controller, which tells the Spring MVC framework that you've taken care of writing to the ServletOutputStream yourself.

      Comment

      Working...
      X