I am using a bean within a JSP page. In the constructor of this bean is a call to a method that could throw an Exception. How does the JSP page know that an exception was thrown during the creation of an instance of the bean class? Thanks Nikhil
Nikhil The JSP knows an exception was thrown in the same way that any other part of your program knows. The exception will be thrown through the different layers of the code until it is either caught or it gets to the top most caller. IF it uncaught the entire way then your JSP will most likely send an HTML error page. Better yet, you could set the error page and then use the error information to customize the response to the user (or to yourself for debuging).
Joined: May 11, 2000
Can I have a try catch block for the <jsp:usebean ..> tag ? Nikhil