Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

jsp bean

  Asked By: Hamish    Date: Dec 31    Category: Java    Views: 842

i have this error when i try to make get to a property of a bean ,
Error(60,65): non-static method getFechaSolicitud() cannot be referenced from a
static context

and i can't recover the value of the property

the code in the jsp

String variable = RcdtForm.getAreaSolicitante();

in my bean this property is declared llike...

private String areaSolicitante;

public String getAreaSolicitante() {
return this.areaSolicitante;



1 Answer Found

Answer #1    Answered By: Olivia Campbell     Answered On: Dec 31

The error  says that you are trying to access an
instance method  from a class and not na instance of a
class. Try creating an object type RcdtForm first.
Like this.

RcdtForm tempvar = new RcdtForm()
String variable = tempvar.getAreaSolicitante();

Didn't find what you were looking for? Find more on jsp bean Or get search suggestion and latest updates.