如题,谢谢!

解决方案 »

  1.   

    你在注册用户登陆的时候不是 在表单上有属性名啊  这是注册页  是一个html的静态页面
    <form action="checkinfo.jsp" method="post">
    <table>
    <tr>
        <td>用户名:</td>
        <td><input type="text" name="uname"></td>
    </tr>
    <tr>
        <td>密码:</td>
        <td><input type="password" name="upassword"></td>
    </tr>
    </table>
    </form>下面是checkinfo.jsp 的内容
    <%
        String uname = request.getParameter("uname");
        String upassword = request.getParameter("upassword");
    %>
    //上面那段内容是为了你做数据库验证的时候用的
    <%=uname%>
    <%=upassword%>
    //上面这个就是在页面上输出 用户名和密码如果不需要验证的话  可以直接在checkinfo.jsp里这么写
    <%=request.getParameter("uname")%>
    <%=request.getParameter("upassword")%>
      

  2.   

    用户登陆成功肯定有返回值 啊
    有的话 在调用方法把用户名传过去
    然后读出用户信息 存到BEAN里  在JSP里显示不就完了