Hi Ching,

Since the data passed from the HTML pages are obtained as Strings in
servlet, it is possible to have a try{}catch(Exception e){} block in which
the String is Parsed. The String could be parsed as a bigdecimal & then
compard whether it lies between the bountries of an Interger & hangled
accordingly.

Hope this helps you to solve the problem...

Regards,
Mahesh

----- Original Message -----
From: Jackson Ching <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 16, 2000 1:41 PM
Subject: Handling Overflows


> Hi,
>
>     How can i handle overflows in java?
>
>     scenario: Webpage form accepts numeric values. Form past to servlet
for processing. What if my servlet contains an int data type and the form
data contains value that exceed the limit of java int. how can i handle
this? Limitting/checking using java script or vbscript is not really an
option since user who wants to crash the system may modify the html page.
I'm thinking more on server-side checking. Thanks in advance.
>
> Jack
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to