Hi,

I have a plain vanilla servlet and I want to "include" via the RequestDispatcher mechanism the rendered output of a struts page. Here's the code I have:

    ServletContext ctx = servletConfig.getServletContext();
RequestDispatcher rd = ctx.getRequestDispatcher("/modules/foo/Home.do?myparam=value");
      if (rd != null) {

          StringWriter stringWriter = new StringWriter();
          MyResponse myresponse = new MyResponse(response, stringWriter);
          rd.include(request, myresponse);
          System.err.println(stringWriter.toString());

      }

I created MyResponse as a wrapper on ServletResponse that contains a buffer so I can pull out the contents. However, I'm not getting anything....

Has anyone done this before? Or is there some easy way to do this?

Thanks, Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to