aspose file tools
The moose likes Servlets and the fly likes parseFloat not working in weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "parseFloat not working in weblogic" Watch "parseFloat not working in weblogic" New topic
Author

parseFloat not working in weblogic

jeyaveera pandian
Ranch Hand

Joined: Sep 29, 2000
Posts: 39
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

Joined: Jan 31, 2000
Posts: 1467
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

Joined: Sep 29, 2000
Posts: 39
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

Joined: Jan 31, 2000
Posts: 1467
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

Joined: Sep 29, 2000
Posts: 39
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

Joined: Nov 06, 2000
Posts: 1506
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


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: parseFloat not working in weblogic
 
Similar Threads
Tech Word Game
WA #2 ..... word association
How to validate float numbers in struts2
See this question
About the data type