如何在Spring Hibernate集成中使用ResultSetMetaData?
在我的JSP页面中,我在DB中显示员工详细信息,并以硬编码的形式给出表列名。现在我需要知道如何动态获取表列名 我知道ResultSetMetaData只在JSP中使用。但是我不知道在JSP中使用Spring Hibernate集成时如何获取列名 有谁能帮忙解决这个问题吗 我的JSP页面将是如何在Spring Hibernate集成中使用ResultSetMetaData?,spring,hibernate,jsp,spring-mvc,Spring,Hibernate,Jsp,Spring Mvc,在我的JSP页面中,我在DB中显示员工详细信息,并以硬编码的形式给出表列名。现在我需要知道如何动态获取表列名 我知道ResultSetMetaData只在JSP中使用。但是我不知道在JSP中使用Spring Hibernate集成时如何获取列名 有谁能帮忙解决这个问题吗 我的JSP页面将是 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&g
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="include.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form:form action="displayuser.html" commandName="displayuser">
<table width="100%" align="center">
<tr style="background-color:#6B8E23 ;">
<td align="center">Employee Id</td>
<td align="center">Employee Name</td>
<td align="center">Employee Password</td>
<td align="center">Gender</td>
<td align="center">Designation</td>
</tr>
<core:forEach items="${DisplayuserDetail}" var="userObj">
<tr style="background-color:#9ACD32 ;">
<td align="center"><core:out value="${userObj.empId}"/></td>
<td align="center"><core:out value="${userObj.empName}"/></td>
<td align="center"><core:out value="${userObj.empPassword}"/></td>
<td align="center"><core:out value="${userObj.gender}"/></td>
<td align="center"><core:out value="${userObj.designation}"/></td>
</tr>
</core:forEach>
</table>
</form:form>
</body>
</html>
在此处插入标题
员工Id
员工姓名
员工密码
性别
任命
先谢谢你。。。如果您的Hibernate持久化对象使用您可以从域对象中删除的注释,我们将非常感谢您的帮助。 或者,看看问题的答案是否有用