Bug 8428 - sql_rt:query maxRows attribute with invalid value
Summary: sql_rt:query maxRows attribute with invalid value
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-23 18:36 UTC by Lance Andersen
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lance Andersen 2002-04-23 18:36:55 UTC
<sql_rt:query var="resultSet2"  maxRows="invalid"
                  dataSource='<%=(DataSource) pageContext.getAttribute("jstlDS
", PageContext.APPLICATION_SCOPE) %>'  >
          <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLIC
ATION_SCOPE)).getProperty("Simple_Select_Query") %>
      </sql_rt:query>


No longer throws a JspException instead you get:


java.lang.NumberFormatException: invalid
Comment 1 Jan Luehe 2002-04-24 19:23:23 UTC
Not a bug.
This is consistent with JSP.2.13.2.1: Conversion from String values, which
specifies that if the target type is "int" or "Integer", the conversion from a
String value is performed according to java.lang.Integer.valueOf(String), which
will give you a java.lang.NumberFormatException for any string value that cannot
be parsed as a number.

JSP.2.13.2.1 states that "a conversion failure leads to an error, whether at
translation time or request-time."