Announcement Announcement Module
Collapse
No announcement yet.
Working with the servlet output stream directly Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Working with the servlet output stream directly

    I have created a number of Views that manage the response stream themselves. The data i have is not html and is constructed dynamically so i don't need any templates, jsps, etc. Can someone comment on the best practice for doing this.

    I am extending AbstractView and overriding renderMergedOutputModel. I set the content type and character encoding and write the data out. Should i now flush and close the output stream? Is this something that the spring framework and/or application server takes care off?

    cheers

  • #2
    The application server takes care of flush and close. You can work with the stream using more specialized spring view classes as well, i.e if a view and a model is expected as a return you simply return null.

    Cheers

    G

    Comment


    • #3
      Which view classes would be best? To give you an idea of what i am doing, I need to output X<L generated by JAXB, and text/plain messages. Is there and spring support for any of these?

      cheers

      Comment


      • #4
        I think that u dont need any more layers of abstraction. You can use direct OOP in conjunction with the controller, in the case of JAXB.

        Comment

        Working...
        X