读书人

帮我看看在页面上显示的时间如何不对

发布时间: 2011-12-05 22:12:57 作者: rapoo

帮我看看,在页面上显示的时间怎么不对?
<%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* " errorPage= " " %>
<%@ page import= "myclass.DealString "%>
<jsp:useBean id= "alogin " scope= "page " class= "myclass.Login " />
<%
String mesg = " ";

if( request.getParameter( "ManagerID ")!=null && !request.getParameter( "ManagerID ").equals( " ")){
String ManagerID =request.getParameter( "ManagerID ");
String password = request.getParameter( "password ");
ManagerID = new String(ManagerID.getBytes( "ISO8859-1 "));
password = new String(password.getBytes( "ISO8859-1 "));
alogin.setManagerID(ManagerID);
alogin.setpassword(password);
if (alogin.excute()){
session.setAttribute( "ManagerID ",ManagerID);
response.sendRedirect( "borrowBooks.jsp ");
%>
<%
}else {
mesg = "登录出错! ";
}
}
%>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />

<title> 图书借阅系统: </title>

<link href= "abc.css " rel= "stylesheet " type= "text/css " />
<style type= "text/css ">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.a1 {
border-right-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: none;
border-right-color: #CCCCCC;
}
.STYLE2 {font-size: 14px}
.STYLE5 {font-size: 14px; color: #FF0000; }
-->
</style>
</head>

<body>
<table width= "829 " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<!--DWLayoutTable-->
<tr>
<td width= "250 " height= "80 " valign= "top "> <img src= "img/logo.gif "/> </td>
<td width= "579 " valign= "top "> <!--DWLayoutEmptyCell-->   </td>
</tr>
<tr>
<td height= "25 " valign= "bottom " background= "img/INDEX_r2_c1.jpg " class= "STYLE2 "> <%=DealString.getDateTime()%> </td>
<td align= "left " valign= "middle " background= "img/INDEX_r2_c1.jpg "> <marquee scrollamount=4 class= "STYLE2 " onmouseover=this.stop() onmouseout=this.start()> 图书借阅系统欢迎你的到来:
</marquee> </td>
</tr>
</table>


<table width= "829 " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 " class= "abc ">
<td width= "829 " height= "75 " align= "center " valign= "middle "> <p> <span class= "STYLE2 "> 图书城管理员登录! </span> </p>
<p class= "STYLE5 ">
<%=mesg%>
</p> </td>
</tr>
<tr>
<td height= "299 " valign= "top " class= "STYLE2 "> <form action= " " method= "post " >
<table width= "100% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td width= "46% " height= "20 " align= "right " valign= "bottom "> <span class= "STYLE2 "> 管理员ID </span> : </td>
<td width= "54% " align= "left " valign= "bottom "> <input type= "text " name= "ManagerID "> </td>
</tr>
<tr>
<td height= "20 " align= "right " valign= "bottom " class= "STYLE2 "> 管理员密码: </td>
<td align= "left " valign= "bottom "> <input type= "password " name= "password "> </td>
</tr>
<tr>
<td height= "20 " align= "right " valign= "bottom "> <input type= "submit " name= "Submit " value= "提交 "> </td>
<td align= "left " valign= "bottom "> <input type= "reset " name= "Submit2 " value= "重置 "> </td>
</tr>
</table>
</form> </td>
</tr>
<tr>
<td width= "100% " height= "20 " align= "right " valign= "bottom "> <a href= "sevlet.jsp "> 点击进入查询页面 </a> </td>
</tr>
</table>
<table width= "829 " border= "0 " cellpadding= "0 " cellspacing= "0 " align= "center ">


<!--DWLayoutTable-->
<tr>
<td width= "829 " height= "20 ">

<DIV align=center class= "STYLE2 ">
Copyright © wanglihua01.COM, All Rights Reserved. </DIV> </td>

</tr>

</table>
</body>
</html>
执行的时候在页面上显示的时间不对,日期是对的


[解决办法]
把服务器的时间设置正确就可以了
[解决办法]
或者就是你服务器上的时间就是错的

读书人网 >Java Web开发

热点推荐