一个html页面,当我打开是显示正确,但当我用tomcat部署后打开时。页面中的汉字显示乱码。不知道什么回事,有知道的朋友。麻烦指点指点。先谢谢了。最为奇怪的是。当我点击浏览器 -》 查看->编码->默认是西欧iso,但我改为gb2312简体中文后。又可以显示正常了。代码如下:
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=GB2312">
<TITLE>Outlook Like Bar</TITLE><!--
  you need this style or you will get an error in ns4 on first page load!
-->
<STYLE>
  div    {
         position:absolute;
         }
</STYLE><script language="JavaScript" src="crossbrowser.js" type="text/javascript">
</script>
<script language="JavaScript" src="outlook.js" type="text/javascript">
</script><SCRIPT>// ---------------------------------------------------------------------------
// Example of howto: use OutlookBar
// ---------------------------------------------------------------------------
  //create OutlookBar
  var o = new createOutlookBar('Bar',0,0,screenSize.width,screenSize.height,'#606060','white')//'#000099') // OutlookBar
  var p  //create first panel
  p = new createPanel('al','组织机构');
  p.addButton('netm.gif','机构管理','parent.main.location="org.action"');
  p.addButton('news.gif','人员管理','parent.main.location="person.action"');
  p.addButton('word.gif','Word','alert("Word")');
  p.addButton('peditor.gif','Editor','alert("Editor")');
  p.addButton('mail.gif','Mail','alert("Mail")');
  o.addPanel(p);
  
  p = new createPanel('p','权限管理');
  p.addButton('mail.gif','模块管理','parent.main.location="module.action"');
  p.addButton('peditor.gif','角色管理','parent.main.location="role.action"');
  p.addButton('word.gif','用户管理','parent.main.location="user.action"');
  p.addButton('news.gif','Adresse','alert("Adresse")');
  p.addButton('mail.gif','Postausgang','alert("Postausgang")');
  p.addButton('mail.gif','Posteingang','alert("Posteingang")');
  p.addButton('news.gif','Information aus<BR>erster Hand','alert("Infos")');
  p.addButton('peditor.gif','Gelbe Post','alert("Gelbe Post")');
  p.addButton('word.gif','Schreiben','alert("Schreiben")');
  o.addPanel(p);  p = new createPanel('l','Leeres Panel');
  o.addPanel(p);  p = new createPanel('l2','Leeres Panel 2');
  o.addPanel(p);  o.draw();         //draw the OutlookBar//-----------------------------------------------------------------------------
//functions to manage window resize
//-----------------------------------------------------------------------------
//resize OP5 (test screenSize every 100ms)
function resize_op5() {
  if (bt.op5) {
    o.showPanel(o.aktPanel);
    var s = new createPageSize();
    if ((screenSize.width!=s.width) || (screenSize.height!=s.height)) {
      screenSize=new createPageSize();
      //need setTimeout or resize on window-maximize will not work correct!
      //ben�1�7tige das setTimeout oder das Maximieren funktioniert nicht richtig
      setTimeout("o.resize(0,0,screenSize.width,screenSize.height)",100);
    }
    setTimeout("resize_op5()",100);
  }
}//resize IE & NS (onResize event!)
function myOnResize() {
  if (bt.ie4 || bt.ie5 || bt.ns5) {
    var s=new createPageSize();
    o.resize(0,0,s.width,s.height);
  }
  else
    if (bt.ns4) location.reload();
}</SCRIPT></head>
<!-- need an onResize event to redraw outlookbar after pagesize changes! -->
<!-- OP5 does not support onResize event! use setTimeout every 100ms -->
<body onLoad="resize_op5();" onResize="myOnResize();">
</body>
</html>