Ok, first to say that I've been searching few days on how to resolve this problem and I've tried million ways but I think that neither of that working for me, or I'm missing something.
I have a db table with a column type date.
I have model class with a field Date.
public class Pacijent {
//..
private Date datum;
//getters and setters
}
And a Data access object for retrieving and storing into a model class like this:
ResultSet rs = ps.executeQuery();
while(rs.next()) {
Pacijent pacijent = new Pacijent();
//..
pacijent.setDatum(rs.getDate("datum"));
//..
pacijents.add(pacijent);
}
Next I set set attribute in controller and retrieve it in jsp page like ${param.paramName}
The problem is that it outputs in yyyy-MM-dd and I want it to show in dd-MM-yyyy. Can you please guide me how do I format that in a right way?