Page caching by overriding the getOutputStream() and getWriter() methods.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   raffe_paffe
Posted On:   Tuesday, October 23, 2001 12:58 AM

Reading this( see second answer)
I wonder how I can do this in
struts. I want to save the response
to my own stream so I can save it.
Which class do I extend in strus do
get this to work?

Re: Page caching by overriding the getOutputStream() and getWriter() methods.

Posted By:   Ted_Husted  
Posted On:   Wednesday, October 24, 2001 01:54 AM

In your Action, you can just return null instead of an
ActionForward


    public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/plain");
response.getWriter().print("Hello World");
return (null);
};


HTH -Ted

About | Sitemap | Contact