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



Home Answers Viewqa JSP-Servlet servlets output to jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


muzammil
servlets output to jsp
0 Answer(s)      4 years and 10 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
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

Advertisement
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
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
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
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 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  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 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 - 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 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
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
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
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 http://www.roseindia.net/servlets/directory-structure.shtml Now visit
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 java.io.*; import java.sql.... Servlet and JSP Examples. Servlet and JSP
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 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-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  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  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 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 - 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 - JSP-Servlet
/servlets/HowToRunAServlet.shtml Thanks
Advertisements
 

 

 

DMCA.com