sory i wrote response mistanly abouve
its a string buffer
i am writing it again
--------------------------
StringBuffer resposne = new StringBuffer("");
URL url;
try {
url = new URL("www.abc.com/op.htm");
URLConnection urlc = url.openConnection();
InputStream in = urlc.getInputStream();
int ch;
while ((ch = in.read()) != -1) {
resposne.append((char) ch);
}
response.setContentType("t
String finalResponse = resposne.toString();
/** To print the data on the client html browser */
out.println(finalResponse)
out.close();
}catch(Exception e)
{
e.printstacktrace();
}
--------------------------
Main Topics
Browse All Topics





by: qasitouchPosted on 2008-02-24 at 10:28:58ID: 20970741
URL url;
ext/html") ;
;
try {
url = new URL("www.abc.com/op.htm");
URLConnection urlc = url.openConnection();
InputStream in = urlc.getInputStream();
int ch;
while ((ch = in.read()) != -1) {
resposne.append((char) ch);
}
response.setContentType("t
String finalResponse = resposne.toString();
/** To print the data on the client html browser */
out.println(finalResponse)
out.close();
}catch(Exception e)
{
e.printstacktrace();
}
--------------
where "response" is HttpServletResponse response
hope this code will solve ur prblem.