I have been thrown into converting some JSP scriptlets items to JSTL expression items.
I am pulling 1 record of the database to for the end user to view before deleting it. It is pulled by it's row id.
"id" is passed from another form like:
<%
String id = request.getParameter("id");
RoleValidatorApprover r = RoleValidatorApproverDao.getRecordById(Integer.parseInt(id));
%>
The Java to "getRecordById" is:
while (rs.next()) {
record = new RoleValidatorApprover();
record.setId(rs.getInt("id"));
record.setAccountid(rs.getString("accountid"));
record.setFirstname(rs.getString("firstname"));
// etc.
}
return record;
The JSP scriptlet works and it uses the following format to fill in the form fields with values:
<input type="text" name="id" value="<%=r.getId()%>" />
<input type="text" name="accountid" value="<%=r.getAccountid()%>" />
<input type="text" name="firstname" value="<%=r.getFirstname()%>" />
Those display in the form fine and dandy but I have no idea how to convert that to JSTL. I looked at "c:out" but still not sure.