Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parseFloat not working in weblogic

 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
while i tried to recieve a parameter from html form to jsp as float, it shows an error like "NoSuchMethodError : Float.parseFloat(java.lang.String)". How to avoid this and how to get the values entered in a textfield as a float
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,
Which compiler version are you using? Just try to compile this simple appln and see if it compiles fine. I didn't get any error with jdk1.2.2 on win98.

Anoother user reports the same prob as yours here.
http://www.javaranch.com/ubb/Forum33/HTML/000031.html
regds
maha anna
 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Maha,
Thanks for your mail. But I have tried this already. It works well for me too if I write and compile it as a standalone programme. But the error comes me while I use the same code in JSP in the Weblogic server.
Plz help me in this regard,
Anbudan,
K.Jeyaveerapandian
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,
Usually the jsp engine uses a java compiler to compile the .jsp file into a servlet class file. I haven't had a chance to work with weblogic. Do you think, the java compiler used by weblogic server is different from the one which is used when you compile the same code as standalone application?
It could be a reason I think. Please try to post in our 'weblogic server' forum in javaranch and let us see if there is any luck.
Sorry, I couldn't think of any reason at present. If I get any other ideas, surely I post under this thread.
One more test, try Integer.parseInt("10") method and see.
regds
maha anna

[This message has been edited by maha anna (edited March 27, 2001).]
 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello maha,
Thanks for your response! I think you are very much correct. I have tested the Integer.parseInt("numString") already. Its working fine with weblogic.
Anyhow I will try this in the weblogic forum.
Anbudan,
K.Jeyaveerapandian
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the compiler that weblogic is using to compile it's translate/compile JSP to a servlet. It's probably not Java 1.2 compliant. parseFloat is a new method in java 1.2.
Bosun
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic