velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Burton <bi...@progress.com>
Subject Re: #parse / #include remote resource
Date Thu, 14 Nov 2002 16:24:46 GMT
Hello Laurie,

1. If you are trying to run CGI's on the same system, you might be able 
to invoke them directly by borrowing the CGIServlet from Tomcat 4.  Then 
you just need a simple tool to call RequestDispatcher.include on that 
servlet.

2. If the above isn't practical for some reason, write a simple tool to 
perform an HTTP GET.  There are many resources that show how to use the 
java.net.HttpURLConnection for this purpose.  You could also look into 
the Jakarta HttpClient library at 
http://jakarta.apache.org/commons/httpclient/ or borrow from 
URLResourceLoader below.

3. You could try Geir's URLResourceLoader.  See 
http://cvs.apache.org/viewcvs/jakarta-velocity/whiteboard/geir/URLResourceLoader.java?rev=1.1&content-type=text/vnd.viewcvs-markup.

-Bill

Laurie Harper wrote:
> I'm trying to integrate another (Perl CGI based) app into a site built with
> Velocity and I'd like to import pages generated by that app into pages
> generated by velocity. The obvious approach would be to use #parse and/or
> #include, but they only work for local files.
> 
> How would I go about getting #parse / #include functionality for remote
> resources? What I'd like to do is
> 
>   #parse ("http://...")
> 
> Does anything like this exist? If not, would it be of interest if I were to
> extend the existing directives?
> 
> L. 
> 


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message