try this:
<%
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exception.printStackTrace(new PrintStream(baos));
out.println(baos.toString());
%>
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROT
See Error tag from Coldtags suite:
http://www.servletsuite.com/jsp.htm
--
Hello there,
Putting the line below gave me the exception message
<%= exception.getMessage() %>
I want to get the printStackTrace of exceptions in JSP.
I read that there is a method for printStackTrace wh
public class Test implements Runnable {
public void run() {
for (int i=1; i<=10; i++){
System.out.println("Test:"+i);
}
}
}
class Test2 {
public static void main (String args[]){
Test te = new Test();
Thread t = new Thread(te);
t.start();
}
}
C:\>java Greebo
Exception in thread "main
Try the below (im presuming that your original code was In a file called
Test.java. The class that contains the main method must be named the same as
the Filename (i.e class Test = Test.java).
class Test {
public static void main (String args[]) {
Test2 te = new Test2();
Threa