<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加管理员</title>
</head><body>
<%
Connection conn=null;
String admin_guanliyuanxingming=request.getParameter("guanliyuanxingming");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String strConn="jdbc:odbc:shopData";
String strUser="sa";
String strPassword="";
conn=DriverManager.getConnection(strConn,strUser,strPassword);
Statement stmt=conn.createStatement();
String strSql = "select Name from AdministratorInformationForm where Name= '" +admin_guanliyuanxingming + "'";
ResultSet rs=stmt.executeQuery(strSql);
if(rs.next())
{
out.println("<h3>查询成功!</h3>");
String name=rs.getString("Name");
out.println(name);
}
else
out.println("<h3>查询失败!</h3>");
rs.close();
stmt.close();
conn.close();
}
catch(ClassNotFoundException e)
{
out.println(e.getMessage());
}
catch(SQLException e)
{
out.println(e.getMessage());
}
%>
<div align="center"><form id="form1" name="form1" method="post" action="admin_add_do.jsp">
<table width="300" border="1">
<tr>
<td colspan="2"><div align="center">添加管理员信息</div></td>
</tr>
<tr>
<td width="316"><div align="center">用户名:</div></td>
<td width="168"><div align="center">
<input name="yonghuming" type="text" id="yonghuming" value="" />
</div></td>
</tr>
<tr>
<td><div align="center">性别:</div></td>
<td><div align="center">
<label>
<input type="text" name="xingbie" id="xingbie" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">出生年月:</div></td>
<td><div align="center">
<label>
<input type="text" name="chushengnianyue" id="chushengnianyue" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">身份证号码:</div></td>
<td><div align="center">
<label>
<input type="text" name="shenfenzhenghaoma" id="shenfenzhenghaoma" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">邮箱:</div></td>
<td><div align="center">
<label>
<input type="text" name="youxiang" id="youxiang" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">密码</div></td>
<td><div align="center">
<label>
<input type="text" name="mima" id="mima" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">
<label>
<input type="submit" name="baocun" id="baocun" value="保存" />
</label>
</div></td>
<td><div align="center">
</div></td>
</tr>
</table></form>
<p> </p>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加管理员</title>
</head><body>
<%
Connection conn=null;
String admin_guanliyuanxingming=request.getParameter("guanliyuanxingming");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String strConn="jdbc:odbc:shopData";
String strUser="sa";
String strPassword="";
conn=DriverManager.getConnection(strConn,strUser,strPassword);
Statement stmt=conn.createStatement();
String strSql = "select Name from AdministratorInformationForm where Name= '" +admin_guanliyuanxingming + "'";
ResultSet rs=stmt.executeQuery(strSql);
if(rs.next())
{
out.println("<h3>查询成功!</h3>");
String name=rs.getString("Name");
out.println(name);
}
else
out.println("<h3>查询失败!</h3>");
rs.close();
stmt.close();
conn.close();
}
catch(ClassNotFoundException e)
{
out.println(e.getMessage());
}
catch(SQLException e)
{
out.println(e.getMessage());
}
%>
<div align="center"><form id="form1" name="form1" method="post" action="admin_add_do.jsp">
<table width="300" border="1">
<tr>
<td colspan="2"><div align="center">添加管理员信息</div></td>
</tr>
<tr>
<td width="316"><div align="center">用户名:</div></td>
<td width="168"><div align="center">
<input name="yonghuming" type="text" id="yonghuming" value="" />
</div></td>
</tr>
<tr>
<td><div align="center">性别:</div></td>
<td><div align="center">
<label>
<input type="text" name="xingbie" id="xingbie" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">出生年月:</div></td>
<td><div align="center">
<label>
<input type="text" name="chushengnianyue" id="chushengnianyue" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">身份证号码:</div></td>
<td><div align="center">
<label>
<input type="text" name="shenfenzhenghaoma" id="shenfenzhenghaoma" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">邮箱:</div></td>
<td><div align="center">
<label>
<input type="text" name="youxiang" id="youxiang" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">密码</div></td>
<td><div align="center">
<label>
<input type="text" name="mima" id="mima" />
</label>
</div></td>
</tr>
<tr>
<td><div align="center">
<label>
<input type="submit" name="baocun" id="baocun" value="保存" />
</label>
</div></td>
<td><div align="center">
</div></td>
</tr>
</table></form>
<p> </p>
</div>
</body>
</html>
<input name="yonghuming" type="text" id="yonghuming" value="" />
你是想显示在这里么?
楼主value=""?value="你要显示的东东"
而且你oracle连接那地方没输出密码啊,你能连上数据库吗?