Have you tried using the static function Double.parseDouble in package
java.lang.* The statement "double B = request.getParameter("txt1");"
shouldn't even compile. try changing it to
"Double.parseDouble(request.getParameter("txt1"));"
See how that works
-----Original Message-----
From: Leena Albert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 19, 2000 6:23 AM
To: [EMAIL PROTECTED]
Subject: PLEASE HELP
Hi,
I have a small problem in using datatype. In a javabean, I am getting
a value "A" from pl/sql procedure and am comparing it with a value "B"
entered in a textbox , that is "B" should be greater than or equal to "A". I
have declared "B" as double in the bean, as i need to use a decimal value
like 1234578899.12345678 .
double B = request.getParameter("txt1");
Eventhough if i give value bigger than A, it is giving the value as low. If
i get less value for "A" and if i give bigger value than that for "B", it
works. I feel that, the value is getting truncated while getting the
parameter from the form .
What datatype can i use, so that even if i use big values, it
should compare?
Thanks in advance,
Leena
_________________________________________________
Get Your Free Email At, http://www.rediffmail.com
For fabulous shopping deals visit:
http://www.rediff.co.in/shopping/index.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email
in error, please notify the sender by email and delete and
destroy this message and its attachments.
**********************************************************************
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets