Pessoal,
estou com a seguinte dúvida:
tenho um método que retorna uma String através de dois parâmetros passados, porem preciso utiliza-lo em uma JSP utilizando JSTL,
minha dúvida é a seguinte. Estou batendo cabeça para passar um parâmetro para esse método que deve retornar uma String em minha JSP.
Método da CLASSE StoreCommons
// Recupera atributo descritivo a partir de um CATENTRY_ID e nome do Atributo
public String getDescriptiveAttributes(String argCatEntryId, String attr) {
String attrDesc = "";
try {
ResultSet rs = getResultSet("SELECT "
+ "ATTRVALUE.STRINGVALUE AS attr " + "FROM "
+ "ATTRIBUTE INNER JOIN ATTRVALUE "
+ "ON ATTRIBUTE.ATTRIBUTE_ID = ATTRVALUE.ATTRVALUE_ID "
+ "WHERE " + "ATTRIBUTE.CATENTRY_ID = '" + argCatEntryId
+ "' " + "AND " + "ATTRIBUTE.NAME = '" + attr + "' ");
if (rs.next()) {
try {
attrDesc = rs.getString("attr").toString();
} catch (SQLException e) {
e.printStackTrace();
}
}
} catch (SQLException e) {
e.printStackTrace();
}
return attrDesc.toString();
}
JSP
// Aqui recupero o id que é carregado com a página e passado como parametro no metodo [b]getDescriptiveAttributes[/b]
<c:set var="id" value="${catEntryIdentifier}"></c:set>
<%
StoreCommons store = new StoreCommons();
String catEntry = request.getParameter("id");
%>
<p class="Autor">
<%=strcm.getDescriptiveAttributes(catEntry,"professor")%> //devo fazer essa chamada usando JSTL e retornar uma String
</p>
<small>
<%=strcm.getDescriptiveAttributes(catEntry,"qtdItens")%> //devo fazer essa outra chamada usando JSTL e retornar uma String
</small>
Não estou conseguindo ter uma luz,
Qualquer ajuda é bem vinda.
Desde já Obrigado