This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If I call my JSP with a non-numeric parameter value, I get a Jasper-specific exception. Should I be somehow catching this exception, and if so, how? Doing so would make my JSP Tomcat-specific and thus non-portable, which seems like a very bad thing to do. My JSP:
What do you want to have happen in these circumstances? Since request params come in as strings and nothing guarantees that they'll be valid, I'd change the bean mutators to accept a String as the value parameter, convert the string to numeric within the mutator, and deal with any parse exceptions (via any of: supply a default value, throw a meaningful exception, trigger a redirect to an error page... whatever makes the most sense for your app). hth, bear [ July 02, 2003: Message edited by: Bear Bibeault ]