Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes validating in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validating in JSP" Watch "validating in JSP" New topic
Author

validating in JSP

Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hello everyone!

I have a situation where i need to get double value from database and check with the entered value in jsp .

I am using Struts 1.0 and netbeans , Sql server.

I got the value from database and put it in session now i need to check this double value with the value entered in jsp.

Can any one help me?



I got error like Double is reserve value and reserve values can not be used.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP. For more information, please click this link ⇒ CarefullyChooseOneForum.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

double min_Amt = (Double) session.getAttribute("minAmt");


Replace the above line with the below and try , and keep this with try catch block for NumberFormatException .




Save India From Corruption - Anna Hazare.
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hi Ravi Kiran!

Thanks for the post but the error is still exist that "double is reserve word so can not be used."

i tried this way but in vain.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

You cannot mix Java scriptlets into JavaScript and expect them to execute in order.

Please read this article to understand how JSP works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validating in JSP
 
Similar Threads
adding numbers
JSP Action Buttons freez after returning from ajax call
can i pass a variable through javascript function to another struts jsp page?
Button value is not getting passed when submit button is disabled
JSF Validatuion to acquire only numeric values for an input field