This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi all, How can we throw an exception from an erroneous JSP to error page. Am using the page directive <%@ page errorPage="errorpage.jsp" %> in each page. But I don't know how to throw an exception in case any exception is raised. For ex: <% String s = getNamesFromList(); %> Say this raises an exception then how do i catch the same and throw it . Your suggestions are welcome. Regards, Mahesh
From whatever minimal knowledge I have about JSPs, I will try to answer this. You don't need to catch and throw the exceptions from your first page. If and when an exception occurs, it is automagically passed to the error page and you can do whatever you want with the exception(ex:do a printStackTrace()) in the error page. Hope this Helps!
Joined: Jan 04, 2001
Thanks for u r reply. I was so dumb trying to figure out how to throw exception. Mahesh