|
Mantis - Resin
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2634 | minor | always | 04-28-08 15:52 | 06-12-08 14:39 | |
|
|
|||||
| Reporter: | nam | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.5 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.2.0 | ||
|
|
|||||
| Summary: | 0002634: overloaded setters in custom JSP tag | ||||
| Description: |
(rep by J. Reynaert) I have a custom tag: Class file snippet: public void setValue(Object obj){ if(obj instanceof Float) this.value = ((Float)obj).toString(); else if (obj instanceof Integer) this.value = ((Integer)obj).toString(); else if(obj instanceof String) this.value = (String)obj; } public void setValue(String value) { this.value = value; } public void setValue(int value) { this.value = String.valueOf(value); } public void setValue(float value) { this.value = String.valueOf(value); } test.jsp <%@taglib uri="/tld/input.tld" prefix="input" %><% float value = 1.0F;%> Float <input:label id="test" value="<%=value%>"/> Integer <input:label id="test" value="<%=(Integer)4%>"/> String expliciet <input:label id="test" value="<%=(String)"foo"%>"/> String default <input:label id="test" value="foo"/> error occurs on the last line (value="foo") Caused by: java.lang.NumberFormatException: For input string: "foo" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at java.lang.Float.valueOf(Float.java:388) at com.caucho.jsp.java.JspNode.generateParameterValue(JspNode.java:1259) ... 28 more Why is it using the float method?? Is there some setting in resin.conf to define this? P.S. it worked for about 2 weeks and today, it suddenly changed. I only recompiled a jsp that is using the custom tags On my development server, a windows2003 machine, it is OK, but on RedHat3.0 it's not OK Very bad thing. eg <input:text name.... value="1"> is rendered in <input type="text" ..... value="1.0"> |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||