servlets output to jsp

servlets output to jsp

hey i have writing a code lately and wanted to print the output to the jsp page from the servlet.the servlet would read the command prompt n thn return the output as string to the jsp page
here is the code.i am unable to get a string rather it is returning an object
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:" +p.getInputStream() );

out.println("</body></html>");

// out.close();
// }

}
catch (Exception err)
{
err.printStackTrace();
}
thanks in adv .need to complete this as soon as possible
n here is the output

Output is:java.io.BufferedInputStream@bc9673
View Answers









Related Tutorials/Questions & Answers:
servlets output to jsp - JSP-Servlet
servlets output to jsp  hey i have writing a code lately and wanted to print the output to the jsp page from the servlet.the servlet would read the command prompt n thn return the output as string to the jsp page here
jsp -servlets
jsp -servlets  i have servlets s1 in this servlets i have created emplooyee object, other servlets is s2, then how can we find employee information in s2 servlets
Advertisements
jsp and servlets
jsp and servlets  what is difference between jsp and servlet?? what should a person use to develop website ??   JSP is used for view in MVC... the request submitted from browser and process the data and redirect it to JSP
jsp and servlets
jsp and servlets  i want code for remember password and forget password so please send as early as possible ............. thanks in advance   Please visit the following link: http://www.roseindia.net/jsf/richfaces
Servlets Vs Jsp - JSP-Servlet
Servlets Vs Jsp  In servlets and Jsp's which one is important? and also tell me the Is Servlets are best or jsp's are best? give me the(reason also... with servlets but not with jsp's)Most of cases we use jsp's for presentation.i.e
jsp,servlets - JSP-Servlet
jsp,servlets   Good Afternoon Sir, I am sowmya i have a doubt that is whether it is possible to use arrays in servlets.how to declare that arrays in servlets and i am getting values from textbox in jsp
servlets and jsp - JSP-Servlet
servlets and jsp  HELLO GOOD MORNING, PROCEDURE:HOW TO RUN A SERVLET AND JSP IN COMMANDPROMPT AND ALSO IN NETBEANS IDE6.0,IT'S VERY URGENT FOR ME,IN ADVANCE THANK U VERY MUCH.   TO Run Servlets in Compand
Servlets vs JSP - JSP-Servlet
Servlets vs JSP  What is the main difference between Servlets and JSP?  Hi Friend, Differences: 1)In MVC, jsp act as a view... and servlet is used for bussiness logic 5)Servlets are faster than jsp. 6
Output Encoding - JSP-Servlet
Output Encoding  From security vulnerability perspective, we?d like to perform output encoding of special characters (ex: < > ? ? % ; ( ) & +) on JSP while displaying pages.How can this be achieved ? Can we achieve
Difference between JSP and Servlets
Difference between JSP and Servlets  What is the difference between JSP and Servlets ?   JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP
JSP output in Console - JSP-Servlet
JSP output in Console  Q:An input text should be read and the same... that ?  Hi Friend, Use System.out.println() in jsp. You will be able to see the output on console. Thanks
JSP and servlets - JSP-Servlet
JSP and servlets  Hi sir, This is vanisree in my project i need to add the start time of examination and end time of examinaion and if the time between end and start are greater than one hour then i need to close that session
JSP-Servlets-JDBC
JSP-Servlets-JDBC  Hi all, 1, Create - i want sample code ( if possible with explanation) to create a registration form in JSP, and the form..... It will be helpful if it's made into sub modules, JSP, Driver Constants, Servlets, Java Beans
servlets - JSP-Servlet
servlets link . you can learn more information about servlets structure. To develop an application using servlet or jsp make the directory structure Read for more information. http://www.roseindia.net/servlets/directory
Servlets in JSF - JSP-Servlet
in the form itself by double clicking why should i go for servlets to write code.... Simply what is the role of servlets in JSF. which one is the best one..jsp...Servlets in JSF  Hi! I am using Java Visual Studio to develop my
java Servlets - JSP-Servlet
java Servlets  Hi i am having a doubt regarding servlets as i am... here i am not using any jsp's. i got up to retriving data from data base but i am...;thanks sir i tried i got the output
how to execute jsp and servlets with eclipse
how to execute jsp and servlets with eclipse  hi kindly tell me how to execute jsp or servlets with the help of eclipse with some small program
servlets - JSP-Servlet
an application using Servlets or jsp make the directory structure given below link http://www.roseindia.net/servlets/directory-structure.shtml Now visit
servlets - JSP-Servlet
servlets.  Hi friend, employee form in servlets...;This is servlets code. package javacode; import java.io.*; import java.sql.... Servlet and JSP Examples. Servlet and JSP
Error output - JSP-Servlet
Error output  Can anyone please assist me; The printed output should be: The product is 10. But instead of it I got; The product is undefined. Can anyone trace what went wrong of my code pls
output error - JSP-Servlet
output error  /*hi friends, the given below is my servlet program error? How can i solve this problem? */ HTTP Status 500 - -------------------------------------------------------------------------------- type Exception
servlets and jsp - JDBC
servlets and jsp  I want to display textboxes dynamically in my page using JSP and servlets (javascript for validation). For eg, consider the recruitment application form for various jobs. The name, address and tel
Servlets,Jsp,Javascript - JSP-Servlet
Servlets,Jsp,Javascript  Hi in my application i am creating a file... ExportToExcel button, jsp Upload plot nos (.xls format). GO Reset ExportToExcel... the browse button which is in my jsp it open the browse window i dont want
servlets - JSP-Servlet
servlets  How would you set an error message in the servlet,and send the user back to the JSP page?Please give java or pseudo code examples.  ...(""); } } --------------------------------------------------- Read for more information. http://www.roseindia.net/servlets
servlets - JSP-Servlet
servlets  how to upload images in servlets  Hi friend, For solving the problem : http://www.roseindia.net/servlets/upload-image.shtml Thanks
servlets - JSP-Servlet
servlets  hi, can anybody help me as what exactly to be done to for compilation,execution of servlets. i also want to know the software required in this execution
Servlets - JSP-Servlet
Servlets  Hi,im d beginner to learn servlets and jsp.please can u... with the host server.It also allows the servlets to write events to a log file... to: http://www.roseindia.net/servlets/ServletContext.shtml http://www.roseindia.net
servlets - JSP-Servlet
servlets  i want to write a simple program on servlet context listener.  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/ServletContextListener-example.shtml Hope
Servlets And Jsp - JDBC
Servlets And Jsp  Sir, I need a program for when i select the one of the field name of table,It has to display the table.Please anyone help me.I need this program fully
Servlets and Jsp - JDBC
Servlets and Jsp  Sir I am getting Nullpointer exception in netbeans ,while running this program. Please help me. http://www.roseindia.net/mysql/select-box.shtml
servlets - JSP-Servlet
servlets  I want to write a simple program on servlet context attribute listener.  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/ServletContextAttributeListener.shtml Hope
servlets - JSP-Servlet
/servlets/HowToRunAServlet.shtml Thanks
servlets execution - JSP-Servlet
servlets execution  the xml file is web.xml file in which the servlet name,servlet class,mapping etc which has to be done.   What u want...://www.roseindia.net/servlets/ Thanks. Amardeep
servlets execution - JSP-Servlet
servlets execution  hi friends, i wanted to know how to compile and run a servlet which has got an html file with it. this html file..., To visit this link for solving the problem: http://www.roseindia.net/servlets
Servlets and Jsp - JDBC
Servlets and Jsp  Sir How to perform the insert for the specified input and remaining fields must be select the values automatically.  Hi Friend, Please clarify your question. Thanks  first you post
Servlets and Jsp - JDBC
Servlets and Jsp  Sir I have seven fields like Matcode ,Matname,Type,Min value,Max Value and Fixed value.Type I have set as dropdownlistbox ,When...,Min value ,Otherfields has to be set as zero.How can i do this in servlets
How to compile & get output for JSP
How to compile & get output for JSP  HI My Roseindia friend has given the answer as RUN the JSP How to run the JSP Program? But what i mean is that i created a small jsp program in HTML and saved as Hello.jsp. And next i opened
servlets - JSP-Servlet
servlets  Hello, I am newbie to servlets. Today, i installed the j2ee sdk. How to compile and run a servlet? i dont wanna use apache or any other server. by defult glssfish eenterprise server was installed along with the j2ee
Servlets - JSP-Servlet
visit the following link: http://www.roseindia.net/servlets
servlets And Jsp - JDBC
servlets And Jsp  Sir, I did updation,deletion and addition, I had taken the program from roseindia web site.http://www.roseindia.net/servlets/multiplemenu.shtml. I did this program.I have included the codings for displaying
servlets execution - JSP-Servlet
servlets execution  hello friend, thanks for the reply.. the link which u `ve provided contains the hello world program which has got html embedded...-linuxproject.blogspot.com/2007/10/running-servlets-on-windows-xp.html u simply provide path name
servlets - JSP-Servlet
servlets link , read more and more information about servlet. how to compile and how to run servlets program.This is running program but you are not able... at : http://www.roseindia.net/servlets/ Thanks
java servlets - JSP-Servlet
java servlets  how to get the parameter value of input type file using java servlets  Hi, You can use request.getParameter(). In Jsp, --- --- IN servlet, String fileName=request.getParameter('fl'); If you
servlets - JSP-Servlet
servlets  how to generate reports in servelts pls tell me from first onwards i.e., i don't know about reports only i know upto servlets... link: http://www.roseindia.net/servlets/index.shtml Thanks
Doubt in servlets - JSP-Servlet
the following link: http://www.roseindia.net/servlets/index.shtml Thanks
JSP to output Java String Array - JSP-Servlet
JSP to output Java String Array  I am just a little confused about the output that I would get from printing a 2D String array loaded with database fields. For example lets say we have the following array: String [ ][ ] array
output not coming properly - JSP-Servlet
output not coming properly  I am not getting the output properly when i had written my code like below: Add Employee Details... Here i am showing the source code of above jsp
how to execute jsp and servlets with eclipse
how to execute jsp and servlets with eclipse  hi kindly tell me how to execute jsp or servlets with the help of eclipse with some small program... http://www.roseindia.net/jsp/crud-application.shtml This will help you in how
servlets DD file - JSP-Servlet
servlets DD file  how many DD files can we possibly have in our servlets project
why business logic in servlets - JSP-Interview Questions
why business logic in servlets  why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet used for coding business logic and controller logic. Reason for using servlets in business logic

Ads