I guess its would throw an instantiation Exception as the the class the Wrapper Interger class cannot be instantiated. This will take place at runtime so it will throw instantiation error...! So your Answer compilation Error is wrong..! [ October 28, 2006: Message edited by: Nilesh Raje ]
Thanks and Regards,<br />Nilesh<br />SCJP 1.4, SCWCD 1.4
If the class attribute is used for a Java type that cannot be instantiated as a JavaBean, the container may consider the page invalid, and is recommended to (but not required to) produce a fatal translation error at translation time, or a java.lang.InstantiationException at request time.
Still, to me translation error makes sense, but an Exception at request time... let's say our jsp was loaded on startup... first it would be translated and after that compiled(no request would have come yet, I think this isn't considered request time yet). IMO this wouldn't make it to the first request, it would fail at compilation time.
Read the excerpt from the spec again, it doesn't say an exception at the first request. What I think it means is that there will be an exception at every request to that page, not when the page is translated or at compile time. So you can catch that exception using c:catch or try-catch or use an exception page in response to the InstantiationException...
Joined: Sep 18, 2009
Ok, I'll just think about it as something it will happen at request time...