写一个查询数据库的页面啊,
if(user==null)
{
“无此ID,请注册”
}
else
{
select * from user where user='"+userid+"'.....
response.sendRedirect("href地址");
}