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
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.
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
posted
0
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
posted
0
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
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.