hey friends i m using servlet in order to write the output to jsp but i m getting output as something BufferedReader.io.inpitstreamreader@somenumbers
i want to return the string output to jsp back .i need help stuck i this thing
try
{
String line;
// String path="/home/muzammil/apache-tomcat-6.0.18/work/Catalina/localhost/remote_compile/"+filen[0];
Process p = Runtime.getRuntime().exec
("java -classpath /home/muzammil/apache-tomcat-6.0.18/work/Catalina/localhost/remote_compile/" +filen[0]);
BufferedReader input =
new BufferedReader
(new InputStreamReader(p.getInputStream()));
line=input.readLine();
while (line != null)
{
out.println("<html>");
out.println("<body>");
out.println("Output is:" +line );
out.println("</body></html>");
out.close();
}
}
catch (Exception err)
{
err.printStackTrace();
}