velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Kebinger <jkebin...@gmail.com>
Subject Re: Content Aggregation
Date Mon, 17 Oct 2005 18:43:21 GMT
Right, you'll have to push the headers manually if you're going to pipe your
CGi output - you can do this more easily with the apache httpclient
class(es) than with the URL class, but either way it isn't pretty.

On 10/17/05, Tod Thomas <tthomas@chubb.com> wrote:
>
> Nathan Bubna wrote:
> > The VelocityTools project includes an ImportTool that may work for you.
> >
> > http://jakarta.apache.org/velocity/tools/view/ImportTool.html
>
>
> Thanks. I've already done something like that using
> java.net.URL.openStream() and streaming the output into a Vector that
> ends up in the Velocity Context. From there I let a template loop
> render it.
>
> The problem is this doesn't pass any of the HTTP header information
> (cookies) to the CGI so none of the dynamic content gets generated on
> the CGI side.
>
>
> > On 10/17/05, Tod Thomas <tthomas@chubb.com> wrote:
> >
> >>I am trying to aggregate a couple of web components into a single
> >>presentation. The main page is based on a Velocity template. The other
> >>is a legacy page generated via CGI on a different server that expects a
> >>combination of cookies and environment variables to produce its output.
> >> Can I do this with Velocity?
> >>
> >>I've looked at the J2ee RequestDispatcher Interface and it seems it may
> >>fit my needs but I'm not sure how to include the end result of the
> >>generated content from the Velocity template. I thought if I could
> >>somehow control the resulting Velocity template output stream I could
> >>just add my CGI app call, and my Velocity servlet to the
> >>RequestDispatcher. I didn't see anything that would let me do that.
> >>
> >>Has anyone run into this who might have a solution or an alternative?
> >>
> >>
> >>Thanks - Tod
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message