Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa JSP-Servlet servlets output to jsp

Have Programming Question? Ask it here!

servlets output to jsp
0 Answer(s)      4 years and 7 months ago
Posted in : JSP-Servlet

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

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()));
// while (line != null)
// {
out.println("Output is:" +p.getInputStream() );


// out.close();
// }

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


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
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:
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
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
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,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 to declare that arrays in servlets and i am getting values from textbox in jsp
servlets and jsp - JSP-Servlet
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
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
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.
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
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
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
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
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
servlets - JSP-Servlet
an application using Servlets or jsp make the directory structure given below link Now visit
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
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
servlets.  Hi friend, employee form in servlets...;This is servlets code. package javacode; import*; import java.sql.... Servlet and JSP Examples. Servlet and JSP
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
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
servlets - JSP-Servlet
servlets  how to upload images in servlets  Hi friend, For solving the problem : 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:
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.
Servlets and Jsp - JDBC
Servlets and Jsp  Sir I am getting Nullpointer exception in netbeans ,while running this program. Please help me.
servlets - JSP-Servlet
servlets  I want to write a simple program on servlet context attribute listener.  Hi Friend, Please visit the following link: Hope
servlets - JSP-Servlet
/servlets/HowToRunAServlet.shtml Thanks
servlets - JSP-Servlet
servlets  i want to write a simple program on servlet context listener.  Hi Friend, Please visit the following link: 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 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...:// 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:
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
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:
servlets And Jsp - JDBC
servlets And Jsp  Sir, I did updation,deletion and addition, I had taken the program from roseindia web site. 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 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 : Thanks
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 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: Thanks
Doubt in servlets - JSP-Servlet
the following link: 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
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
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... 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
Redirecting the output of an expression to a variable - JSP-Servlet
' file: Create another jsp file 'get.jsp' to get the output: Thanks...Redirecting the output of an expression to a variable  I want to redirect the output of to a variable defined in variable.jsp. What is the syntax