I have a problem calling a method.
public class propietario{
public static void modificarCoeficiente (HttpServletRequest request, HttpServletResponse response, BaseWeb base) {
HttpSession session = request.getSession();
ParticipantePOJO vParticipante = (ParticipantePOJO)session.getAttribute("Participante");
String coef = request.getParameter("Coeficiente");
double coeficiente = Double.parseDouble(coef);
try{
int IdParticipante = vParticipante.getIdParticipante();
ModificarPreciosControlador ModificarPreciosControlador = new ModificarPreciosControlador();
ModificarPreciosControlador.modCoeficiente(IdParticipante, coeficiente);
}catch(Exception ex){
base.getLoggerGarageScanner().error("Se ha producido un error");
request.setAttribute("errorpanelcontrol", "propietariocomunidaderrorcarga");
}
finally{
}
}
}
And I'm trying to call this method.
public class ModificarPreciosControlador extends BaseControlador{
public void modCoeficiente (int pIdParticipante, double coeficiente) throws Exception{
ListaParametrosEntrada lstParametros = new ListaParametrosEntrada();
lstParametros.addParametroEntrada(java.sql.Types.INTEGER, pIdParticipante);
lstParametros.addParametroEntrada(java.sql.Types.INTEGER, coeficiente);
super.lanzarProcedimientOut("spUpdateCoeficiente", lstParametros);
//return null;
}
}
But I get the following error:
non static method cannot be referenced from a static context java.
Any solution?