Taglibs to get HTML fragment ?
Hello all,
I'm looking for a Taglibs that will allow me to get some HTML pages located on another web server.
I would like to use like this :
<x:request host="http://www.myserver.com/fragment1.html">
I tried the Jakarta Taglibs but I didn't found a component.
Thanks.
[312 byte] By [
Arloa] at [2007-11-26 16:18:39]

# 1
Does it have to be a taglib, because the code snipet like this would work.
<%
URL url1 = new URL("http://www.myserver.com/fragment1.html");
BufferedReader urlReader = new BufferedReader(new InputStreamReader(url1.getInputStream()));
String line;
while( (line = urlReader.readLine()) != null)
{
out.print(line);
}
%>
and if you wanted to you could extract that code into a class and do something like this
<%= myURLReader.read("http://www.myserver.com/fragment1.html")%>