cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Heidl <he...@zib.de>
Subject Re: String to Integer
Date Fri, 17 Nov 2000 12:16:32 GMT
On Fri, Nov 17, 2000 at 12:51:43PM +0100, Kai.Rehlen@pass-consulting.com wrote:
> <xsp:logic>
> String strK1 = request.getParameter ("K1");
> 		Int K1 = Integer.parseInt (strK1);
> </xsp:logic>
> ...
> 
> But when trying to conver I get the following error.
> ...
The method Integer.parseInt() returns a plain int, so it
should read:
int K1 = Integer.parseInt(strK1);

btw: be sure to catch the NumberFormatException ;-)

Sebastian

Mime
View raw message