求助:用java语言写一个用户登陆系统,服务器与客服端连接上了,但不会用服务器验证用户信息。往下看。
服务器验证用户信息正确,则客户端弹出一个新的界面;信息错误,则客户端那边弹出一个提示“密码错误”的窗口。本人很急,实训任务马上要交了,能帮我解决问题的我再加200!!!Q...
服务器验证用户信息正确,则客户端弹出一个新的界面;信息错误,则客户端那边弹出一个提示“密码错误”的窗口。
本人很急,实训任务 马上要交了,能帮我解决问题的 我再加200!!!
QQ谈论比较方便 464436503 展开
本人很急,实训任务 马上要交了,能帮我解决问题的 我再加200!!!
QQ谈论比较方便 464436503 展开
展开全部
这个是登录界面jsp的。你自己连接后台代码(Action)!祝你好运
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkForm(){
var form = document.forms[0];
if(form.username.value=="" || form.username.value.length<6){
alert("请输入长度6位以上的用户名");
return false;
}
if(form.password.value=="" || form.password.value.length<6){
alert("请输入长度6位以上的密码");
return false;
}
return true;
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #666666}
.logintitle H2 {
DISPLAY: block; FONT-WEIGHT: bold; FONT-SIZE: 14px; MARGIN: 0px 0px 0px 0px;PADDING:0 0 0 10px;color:#525252
}
.ablue2{
FONT-SIZE: 14px; color:#0066FF
}
-->
</style>
</head>
<body>
<jsp:include page="/WEB-INF/page/share/simpleHead.jsp"/>
<!-- Head End -->
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center border=0>
<TBODY>
<TR><TD background="/images/login/login_03.jpg"> </TD></TR>
</TBODY>
</TABLE>
<br/><c:if test="${!empty message}">
<DIV id="errorinfo">
<TABLE cellSpacing=1 cellPadding=8 width="600" align="center" bgColor="#dd9988" border=0>
<TBODY>
<TR>
<TD bgColor="#ffffd5" align="left"><IMG height="17" src="/images/buy/exclamation-error-red.gif" width="17"> <FONT color="#990000"><STRONG><SPAN class="font14">错误提示<BR></SPAN></STRONG></FONT>
<DIV id="errorMessage">${message }</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV></c:if>
<html:form action="/user/logon" method="post" onsubmit="javascript:return checkForm()">
<INPUT TYPE="hidden" NAME="directUrl" value="${param.directUrl}"/>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><table width="80%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="100%" height="50" valign="top"><table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/global/loginicon1.gif" width="16" height="15" align="absBottom"></td>
<td width="97%" align="left" class="logintitle"><H2>管理员登录</H2></td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right" class="c5"><strong>您的用户账号:</strong></td>
<td width="27%"> <input name="username" id="username" type="text" size="20" maxlength="20" /></td>
<td align="left"> </td>
</tr>
<tr>
<td colspan="3" align="right" height="15"></td>
</tr>
<tr>
<td align="right" class="c5"><strong>您的密码:</strong></td>
<td > <input name="password" type="password" size="20" maxLength="16"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" align="right"> </td>
<td width="8%" align="left" valign="middle"><input type="image" name="ImageButton1" src="/images/global/regloginbutton2.jpg" alt="" border="0" /> </td>
</tr>
</table> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table></html:form>
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkForm(){
var form = document.forms[0];
if(form.username.value=="" || form.username.value.length<6){
alert("请输入长度6位以上的用户名");
return false;
}
if(form.password.value=="" || form.password.value.length<6){
alert("请输入长度6位以上的密码");
return false;
}
return true;
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #666666}
.logintitle H2 {
DISPLAY: block; FONT-WEIGHT: bold; FONT-SIZE: 14px; MARGIN: 0px 0px 0px 0px;PADDING:0 0 0 10px;color:#525252
}
.ablue2{
FONT-SIZE: 14px; color:#0066FF
}
-->
</style>
</head>
<body>
<jsp:include page="/WEB-INF/page/share/simpleHead.jsp"/>
<!-- Head End -->
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center border=0>
<TBODY>
<TR><TD background="/images/login/login_03.jpg"> </TD></TR>
</TBODY>
</TABLE>
<br/><c:if test="${!empty message}">
<DIV id="errorinfo">
<TABLE cellSpacing=1 cellPadding=8 width="600" align="center" bgColor="#dd9988" border=0>
<TBODY>
<TR>
<TD bgColor="#ffffd5" align="left"><IMG height="17" src="/images/buy/exclamation-error-red.gif" width="17"> <FONT color="#990000"><STRONG><SPAN class="font14">错误提示<BR></SPAN></STRONG></FONT>
<DIV id="errorMessage">${message }</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV></c:if>
<html:form action="/user/logon" method="post" onsubmit="javascript:return checkForm()">
<INPUT TYPE="hidden" NAME="directUrl" value="${param.directUrl}"/>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><table width="80%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="100%" height="50" valign="top"><table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/global/loginicon1.gif" width="16" height="15" align="absBottom"></td>
<td width="97%" align="left" class="logintitle"><H2>管理员登录</H2></td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right" class="c5"><strong>您的用户账号:</strong></td>
<td width="27%"> <input name="username" id="username" type="text" size="20" maxlength="20" /></td>
<td align="left"> </td>
</tr>
<tr>
<td colspan="3" align="right" height="15"></td>
</tr>
<tr>
<td align="right" class="c5"><strong>您的密码:</strong></td>
<td > <input name="password" type="password" size="20" maxLength="16"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" align="right"> </td>
<td width="8%" align="left" valign="middle"><input type="image" name="ImageButton1" src="/images/global/regloginbutton2.jpg" alt="" border="0" /> </td>
</tr>
</table> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table></html:form>
追问
谢谢 但我要的是java语言写的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个是登录界面jsp的。你自己连接后台代码(Action)!祝你好运
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkForm(){
var form = document.forms[0];
if(form.username.value=="" || form.username.value.length<6){
alert("请输入长度6位以上的用户名");
return false;
}
if(form.password.value=="" || form.password.value.length<6){
alert("请输入长度6位以上的密码");
return false;
}
return true;
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #666666}
.logintitle H2 {
DISPLAY: block; FONT-WEIGHT: bold; FONT-SIZE: 14px; MARGIN: 0px 0px 0px 0px;PADDING:0 0 0 10px;color:#525252
}
.ablue2{
FONT-SIZE: 14px; color:#0066FF
}
-->
</style>
</head>
<body>
<jsp:include page="/WEB-INF/page/share/simpleHead.jsp"/>
<!-- Head End -->
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center border=0>
<TBODY>
<TR><TD background="/images/login/login_03.jpg"> </TD></TR>
</TBODY>
</TABLE>
<br/><c:if test="${!empty message}">
<DIV id="errorinfo">
<TABLE cellSpacing=1 cellPadding=8 width="600" align="center" bgColor="#dd9988" border=0>
<TBODY>
<TR>
<TD bgColor="#ffffd5" align="left"><IMG height="17" src="/images/buy/exclamation-error-red.gif" width="17"> <FONT color="#990000"><STRONG><SPAN class="font14">错误提示<BR></SPAN></STRONG></FONT>
<DIV id="errorMessage">${message }</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV></c:if>
<html:form action="/user/logon" method="post" onsubmit="javascript:return checkForm()">
<INPUT TYPE="hidden" NAME="directUrl" value="${param.directUrl}"/>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><table width="80%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="100%" height="50" valign="top"><table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/global/loginicon1.gif" width="16" height="15" align="absBottom"></td>
<td width="97%" align="left" class="logintitle"><H2>管理员登录</H2></td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right" class="c5"><strong>您的用户账号:</strong></td>
<td width="27%"> <input name="username" id="username" type="text" size="20" maxlength="20" /></td>
<td align="left"> </td>
</tr>
<tr>
<td colspan="3" align="right" height="15"></td>
</tr>
<tr>
<td align="right" class="c5"><strong>您的密码:</strong></td>
<td > <input name="password" type="password" size="20" maxLength="16"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%"
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkForm(){
var form = document.forms[0];
if(form.username.value=="" || form.username.value.length<6){
alert("请输入长度6位以上的用户名");
return false;
}
if(form.password.value=="" || form.password.value.length<6){
alert("请输入长度6位以上的密码");
return false;
}
return true;
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #666666}
.logintitle H2 {
DISPLAY: block; FONT-WEIGHT: bold; FONT-SIZE: 14px; MARGIN: 0px 0px 0px 0px;PADDING:0 0 0 10px;color:#525252
}
.ablue2{
FONT-SIZE: 14px; color:#0066FF
}
-->
</style>
</head>
<body>
<jsp:include page="/WEB-INF/page/share/simpleHead.jsp"/>
<!-- Head End -->
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center border=0>
<TBODY>
<TR><TD background="/images/login/login_03.jpg"> </TD></TR>
</TBODY>
</TABLE>
<br/><c:if test="${!empty message}">
<DIV id="errorinfo">
<TABLE cellSpacing=1 cellPadding=8 width="600" align="center" bgColor="#dd9988" border=0>
<TBODY>
<TR>
<TD bgColor="#ffffd5" align="left"><IMG height="17" src="/images/buy/exclamation-error-red.gif" width="17"> <FONT color="#990000"><STRONG><SPAN class="font14">错误提示<BR></SPAN></STRONG></FONT>
<DIV id="errorMessage">${message }</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV></c:if>
<html:form action="/user/logon" method="post" onsubmit="javascript:return checkForm()">
<INPUT TYPE="hidden" NAME="directUrl" value="${param.directUrl}"/>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><table width="80%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="100%" height="50" valign="top"><table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="/images/global/loginicon1.gif" width="16" height="15" align="absBottom"></td>
<td width="97%" align="left" class="logintitle"><H2>管理员登录</H2></td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" align="right" class="c5"><strong>您的用户账号:</strong></td>
<td width="27%"> <input name="username" id="username" type="text" size="20" maxlength="20" /></td>
<td align="left"> </td>
</tr>
<tr>
<td colspan="3" align="right" height="15"></td>
</tr>
<tr>
<td align="right" class="c5"><strong>您的密码:</strong></td>
<td > <input name="password" type="password" size="20" maxLength="16"> </td>
</tr>
</table> </td>
</tr>
<tr>
<td><table width="95%"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我已经把服务器和客户端的带码给你发了。请查收。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询