Announcement Announcement Module
Collapse
No announcement yet.
Getting access to the HttpServletResponse Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting access to the HttpServletResponse

    I need to get access to the HttpServletResponse so I can pass it to a view (which happens to be Velocity) from an Action in a SWF. What is the best way of doing that? I'm currently subclassing AbstractAction. Is there a different Action class I should be using?

    BTW, the whole point of this exercise is to be able to set the contentType to excel in the view.

    I'm also looking into an alternative way of getting to the HttpServletResponse in Velocity using Velocity methods (naturally, I'm asking the Velocity guys and gals on their mailing list).

  • #2
    I believe this is on the wiki FAQ:

    ((HttpServletEvent)context.getSourceEvent()).getRe sponse();

    Comment


    • #3
      Thanks. Of all the places I spent hours looking, the FAQ wasn't one of them. I'll look there in the future.

      One correction... the FAQ casts to "ServletEvent" rather than "HttpServletEvent".

      Comment


      • #4
        Gettng flow context

        How do I get the context? Also ServletEvent does not get resolved. COuld you please respond?

        Thank you

        Comment

        Working...
        X