tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Holladay" <rich.holla...@hksystems.com>
Subject custom tag attribute & int parameter?
Date Thu, 25 May 2000 16:17:07 GMT
In the 3.1 Beta release I was able to use the PAGER tag library from
jsptags.com.

With the latest release I get a JSP compile-time error because there are
setAttribute(int value) methods in the tag.

Original code (worked in 3.1 Beta):
 public void setMaxIndexPages(int value) {
  maxIndexPages = value;
}

JSP compile error (in current Tomcat):
Ctx( /scv ) Error in jsp service() : Unable to compile class for
JSPE:\tomcat\work\localhost_8080%2Fscv\_0002fInventoryQuery_0002ejspInventoryQuery_jsp_0.java:925:
Incompatible type for method. Can't convert java.lang.String to int.
    _jspx_th_pg_pager_0.setMaxIndexPages("20");

New code works fine:
 public void setMaxIndexPages(String value) {
  maxIndexPages = new Integer(value).intValue();
 }

-----------
The Tag Extensions spec doesn't seem to be explicit about whether or not
attributes with int parameters must be supported.  Is Tomcat supposed to
support int parameters?


Mime
View raw message