HI Chris,

  I am not sure why you want them.  I guess it can be done.  I am sure main
method will not run in JSP so you have to write some method which does your
process and gives an output. Now if you want to get the output try to print it
as a file in the server.  Then you have to find the location of the file that
has been generated and read it using I/O stream.
By this way you will be able to read the output and convert it as a string.
Now you can pass this string to the System.out.println or what ever you want
to do with it.
 There is a small problem here.  You have to  make your file name unique so
that it can be identified as your application as it may be used by any other
person in the network. To achive this you can read the machine ip address as
the file name.
 Hope this would save your purpose.  If you find any other solution i would be
happy to know.

Regards,
Jagan Rao M



Chris Probert <[EMAIL PROTECTED]> wrote:
JSP list,

Could anyone help me? I am attempting to run a java class (which
has a main method) from within a jsp page, and display the
output, which is being sent to System.out.println. Is this
possible, I feel that it should be, but my attempts have all
fallen flat.
If this is not simple to do with jsp, could anyone advise a
better way to run a java class and capture the output in a
browser? I have tried perl but can't seem to get hold of the
output.

TIA


Chris Probert
[EMAIL PROTECTED]

Electronic Trade Services
St. Alkmunds House
103 Belper Road
Derby
DE1 3ER

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to