reset password
Author Message
JackStrauss
Posts: 236
Posted 12:34 Feb 12, 2013 |

This bit of code is throwing an exception that does not allow me to complete the program:

 

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /SaleEntry1.jsp at line 39

36:     Integer.parseInt(discountString);
37: } catch(NumberFormatException nfe) {}
38: %>
39: <jsp:setProperty 
40:     name="entry" 
41:     property="discountCode"
42:     value="<%= discountCode %>" />


root cause

org.apache.jasper.JasperException: java.lang.IllegalArgumentException: argument type mismatch

I haven't researched a solution, but is there a quick fix to this aside from not using this type of code?

 

My guess is that the exception involves a string formatting problem where a string value is not being formatted properly before being parsed to an Integer value. 

JackStrauss
Posts: 236
Posted 12:40 Feb 12, 2013 |

Update.

I have the entire exercise working properly on my local machine.  It turns out, I was missing the SaleEntry1Form.jsp file, and once I ran this file, the entire program worked correctly.

 

However, if anyone has any insight on on the exception that occurs, please post. 

Thank you.

Regards.