I have a JSP script I stripped down to just this one scriptlet:
<%
Thread t = new Thread(new Runnable() {
public void run() {
System.out.println("Hello World");
}
});
t.start();
t.join(5000);
%>
<html>
<head>
<title>Hello</title>
</head>
<body>Hello World</body>
</html>
Whenever I try to run this I get the following output:
Error 500: String index out of range: -1
It doesn't give line number or any other explanation, furthermore, the
logs have no entry of anything for the time period whereby I ran this
script via browser.
Whenever I take out the Thread reference the script runs just fine,
even if I add other scriptlets with JSP code elsewhere, otherwise, as
long as this "empty" or "useless" thread exists, I get the weird and
very nondescript error.
Ideas?
Phil
Roger Lindsjö - 09 Mar 2008 19:34 GMT
> I have a JSP script I stripped down to just this one scriptlet:
>
[quoted text clipped - 30 lines]
>
> Ideas?
Works fine for me on both tomcat 5.5.26 and 6.0.16. What version are you
running?

Signature
Roger Lindsjö