日期:2014-05-18  浏览次数:20670 次

困扰我几天的问题,高手帮忙(高分求出)
我想实现用户登陆功能,用的是:weblogic8.1+oracle9.0+jbuilder9,
首先我在oracle下建一个用户然后建一个名为userinfo的表,字段有userid,name
,age,password
然后我写了两个jsp分别为title.jsp
代码为
<%@   page   language= "java "   contentType= "text/html;   charset=GBK "   %>
<html>
<head>
<title>   Untitled   Document </title>
<meta   http-equiv= "Countent-type "     content= "text/html;charset=gb2312 ">
</head> <LINK   href= "hellking.css "   type=text/css   rel=stylesheet>
<body>
<%
        boolean   isLog=false;
        try
        {
                  isLog=((String)session.getAttribute( "isLog ")).equals( "1 ");
        }
        catch(Exception   e)
        {
        }
%>
<table   width= "842 "   align=center   cellpadding=3   cellspacing=1   class=tableborder1>
<tr>
<td   width= "832 "   class=tablebody2> ::
<a   href= "index.jsp   target= "_top "> 首页 </a>
<%if(isLog){%> <a   href= "logout.jsp   target= "_top "> 注销 </a> <%}%> ::
</td> </tr> <tr>
<td   width= "832 "   class=tablebody2>
<%
        if(isLog)
        {
                %>
          欢迎光临!
        <%=session.getAttribute( "name ")%> ,您是第
        <%=session.getAttribute( "userLogCount ")%>
        次登陆,您上次登录的时间是:
        <%=session.getAttribute( "userLastLogTime ")%>
        <%
        }
        else
        {
        %>

<form   name= "form1 "   method= "post "   action= "login.jsp ">
&nbsp;&nbsp;&nbsp;用户名
<input   type= "text "   name= "userID "   size= "15 "   style= "BORDER-RIGHT:#ffffff   1px
groove;BORDER-TOP:#ffffff   1px   groove;FONT:12px   Verdana,Geneva,sans-serif;
BORDER-LEFT:#ffffff   1px   groove;WIDTH:100px;COLOR:#000000;BORDER-BOTTOM:#ffffff
1px   groove;HIGHT:18px;BACKGROUND-COLOR:#DFF1F9 ">
密码
<input   type= "password "   name= "password "   size= "15 "
style= "BORDER-RIGHT:#ffffff   1px
groove;BORDER-TOP:#ffffff   1px   groove;FONT:12px   Verdana,Geneva,sans-serif;
BORDER-LEFT:#ffffff   1px   groove;WIDTH:100px;COLOR:#000000;BORDER-BOTTOM:#ffffff
1px   groove;HIGHT:18px;BACKGROUND-COLOR:#DFF1F9 ">
<input   type= "submit "   name= "Submit "   value= "确定 "
style= "height:20;font:9pt;BORDER-BOTTOM:#cccccc   1px   groove;
BORDER-RIGHT:#cccccc   1px   groove;BACKGROUND-COLOR:#eeeeee ">