Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

validating in JSP  RSS feed

 
Krish Khan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .



 
Krish Khan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot mix Java scriptlets into JavaScript and expect them to execute in order.

Please read this article to understand how JSP works.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!