我就直接写代码:
数据库直接连接的是oracle 用户scott emp表
jsp界面中应该写如下代码。显示的是汉字:
<table class="tablesty">
<tr class="titlesty">
<th>编号</th>
<th>职位</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>部门</th>
<th>工龄</th>
</tr>
<c:forEach items="${EmployInfo}" var="emp">
<tr style="text-align: center;background: #0000000;margin:15px;">
<td>000${emp.id}</td>
<c:if test="${emp.type==1}"><td>行政助理</td></c:if>
<c:if test="${emp.type==2}"><td>业务经理</td></c:if>
<c:if test="${emp.type==3}"><td>总经理</td></c:if>
<td>${emp.name}</td>
<td>${emp.sex==1?"男":"女"}</td>
<td>${emp.age}</td>
<td>${emp.name}</td>
<td>${emp.year}</td>
</tr>
</c:forEach>
</table>
如果有看懂的可以直接找我qq891152868