这个jsp页面中的相关代码如下:<% UserForm uf =(UserForm) session.getAttribute("uform"); %>
<% //String bianhao ="select id from yuangong where userName = 'uf.getUserName()'";%>
<td height="31"><%=uf.getUserName()%></td>
<td height="31"><%//=String(bianhao)%></td>
其中<%=uf.getUserName()%>能输出正确的用户名,我想输出员工编号怎么弄?
<% //String bianhao ="select id from yuangong where userName = 'uf.getUserName()'";%>
<td height="31"><%=uf.getUserName()%></td>
<td height="31"><%//=String(bianhao)%></td>
其中<%=uf.getUserName()%>能输出正确的用户名,我想输出员工编号怎么弄?
<% //String bianhao ="select id from yuangong where userName = 'uf.getUserName()'";%>这条语句中去掉即最后为
<%String bianhao ="select id from yuangong where userName = 'uf.getUserName()'";%>
<%=bianhao%>