Skip to main content

java.lang.NumberFormatException: For input string: "${first}"

4 replies [Last post]
jlaci1
Offline
Joined: 2008-11-15
Points: 0

Hi,

We have a web application, that runs well on Sunone 6.1 and weblogic 9.2.

Tried to deploy on glassfish v2, but received this error. What is different is glassfish jspc compiler??

Error:

java.lang.NumberFormatException: For input string: "${first}"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

at java.lang.Integer.parseInt(Integer.java:447)

at java.lang.Integer.valueOf(Integer.java:553)

at org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:794)

at org.apache.jasper.compiler.Generator$GenerateVisitor.convertString(Generator.java:3133)

at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2928)

at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3042)

at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2341)

at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1785)

at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)

at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)

at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)

at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)

at org.apache.jasper.compiler.Generator.generate(Generator.java:3494)

at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)

at org.apache.jasper.JspC.processFile(JspC.java:1150)

at org.apache.jasper.JspC.execute(JspC.java:1319)

at org.apache.jasper.JspC.main(JspC.java:322)

org.apache.jasper.JasperException: java.lang.NumberFormatException: For input string: "${first}"

The problematic code fragment:
^M

^M

^M

^M

^M

^M

^M

^M

^M

^M

^M

^M

>^M

1 && first==pos)}">...^M

^M

^M

^M

^M

^M

Full page code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-2"
pageEncoding="ISO-8859-2"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

search results

<%@page import="smsPhoneBook.Person"%>

1}">

>
1 && first==pos)}">...

>

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jlaci
Offline
Joined: 2008-09-29
Points: 0

Bad for glassfish v2:

Workaround:

jlaci1
Offline
Joined: 2008-11-15
Points: 0

Full page code: <%@ page language="java" contentType="text/html; charset=ISO-8859-2" pageEncoding="ISO-8859-2"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> search results <%@page import="smsPhoneBook.Person"%> > ...


>Hozzáadás a címzettekhez...
jluehe
Offline
Joined: 2004-12-01
Points: 0

Just for the sake of others, this is the same thread as

http://forums.java.net/jive/thread.jspa?messageID=317204

and the issue filed is

https://glassfish.dev.java.net/issues/show_bug.cgi?id=6806

jlaci1
Offline
Joined: 2008-11-15
Points: 0

The problematic code fragment: ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M >^M ...^M ^M ^M ^M ^M ^M