In my spring project, my view receive from controller a Map object like this:
Map<String, List<?>>
which I access in my jsp code this way:
<c:forEach var="field" items="${values[item]}">
<c:out value="${field}"/> <br/>
</c:forEach>
Considering the class indicatd by ?
it's a regular POJO class, how I can access the attributes from this class in my jsp? In other words, what the correct instruction I should use to replace:
<c:out value="${field}"/> <br/>
because with this I am getting something like that when I open the page in the browser:
com.spring.loja.model.categoria.persistence.model.Categoria@41c0e228
UPDATE
I try use this, following answer posted in this topic:
<c:out value="${field.name}"/>
but I wonder if there is a way to use this method instead:
@Override
protected String getArgument(int ordem) {
switch(ordem) {
case 0: return "Id";
case 1: return "Login";
case 2: return "Senha";
case 3: return "Nome";
case 4: return "Sobrenome";
case 5: return "E-Mail";
case 6: return "Autorizacao";
default: return null;
}
}
and this way be able to avoid the use of the name of the getter method (It's a generic jsp page, used by several views, and I don't know which method will be used)