Archive for June, 2007

Java

Hi,

Developers who write JSP will face this problem. They will end up with a JasperException, they have to pull their hairs to find the actual reason, either by try-catch block or any other way. if you have used jsp usebean tag, thats end. you have to put traces inside the bean. So, we need a way to get the exact exception that was probagated. So here is the way.

if( e instanceof ServletException ) {
pw.println( "Root cause:" );
( (ServletException) e ).getRootCause().printStackTrace( sw );

}

yes. this will solve your problem. ofcourse, if we put this code inside errorPage, that will be very helpful for us to track the exceptions.

Hi,

I am sharing an instance of a Vector in two places, one is populating the vector and another one is iterating it. two codes are synchronized. Very frequently I got in to a problem saying ConcurrentModificationException while iterating the code. Ofcourse, while iterating we may not update the collection. But will it lead to this kind of exception while the code is inside a synchronized. On cloning the collection, I cud come out of the problem. But this may not be a solution!

Hi,

While hitting a jsp with list of parameters appended to its URL, It was working fine in Mozilla Firefox, Suddently it broke down in IE saying Error: Invalid Pointer .

Later we come to know that the length of the string becomes a problem. We have gone in alternate way and rectfied this problem. Is there anyway by which I can pass long string as parameter to a URL via XMLHttpRequest?