Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » app engine req.getParameter with type float
app engine req.getParameter with type float [message #835042] Mon, 02 April 2012 18:23 Go to next message
Natalia Molinero is currently offline Natalia MolineroFriend
Messages: 1
Registered: April 2012
Junior Member

0down votefavorite

share [g+]share [fb]share [tw]

I'm trying to do something very similar to the Guestbook which is in the App Engine tutorial (get started). However, I want to modified the types of the fields in the form. Eclipse doesn't show any error, but the server says:

HTTP ERROR 500 Problem accessing /. Reason:
java.lang.String cannot be cast to java.lang.Long

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long at$1.apply( at$1.apply( at at

This is what I'm doing:

@Persistent private float weight; 
public Greeting (User author, String content, Date date, String weight) { = author; 
this.content = content; = date; 
this.weight = Float.parseFloat(weight); } 
public float getWeight() { 
return weight; }

I don't know where the error is...

Thank you in advance!!
Re: app engine req.getParameter with type float [message #835141 is a reply to message #835042] Mon, 02 April 2012 21:12 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1409
Registered: July 2009
Senior Member
Not a JDT question. Ask in a Web Development forum.
Previous Topic:BugZilla... Is It Being Actioned?
Next Topic:Intellisense does not work for one class
Goto Forum:

Current Time: Sat May 26 06:33:36 GMT 2018

Powered by FUDForum. Page generated in 0.01541 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top