<%=request.getLocale() %>
   
  <fmt:bundle basename="input">
   <h1><fmt:message key="welcome"/></h1><hr/>
    <form action="" method="post">
     <table width="250" border="1">
  <TR><TD><fmt:message key="用户名"/></TD><TD><input type="text" name="uname"/></TD></TR>
   <TR><TD><fmt:message key="密码"/></TD><TD><input type="password" name="pwd"/></TD></TR> 
   <TR><TD colspan="2"><input type="submit" value='<fmt:message key="submit"/>'/>&nbsp;&nbsp;
   <input type="reset" value='<fmt:message key="reset"/>'/></TD></TR>
  </table>
 
    </form>
  </fmt:bundle>

解决方案 »

  1.   

    这个是乱码啊 ,你在DTD中设置pageEncodeing="utf-8"还有charset="utf-8"不行就换GBK,,^_^
      

  2.   

    页码格式是UTF-8的呀<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'index.jsp' starting page</title>
        
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->  </head>
      
      <body>
       
      <fmt:bundle basename="input">
       <h1><fmt:message key="welcome"/></h1><hr/>
        <form action="" method="post">
         <table width="250" border="1">
          <TR><TD><fmt:message key="用户名"/></TD><TD><input type="text" name="uname"/></TD></TR>
           <TR><TD><fmt:message key="密码"/></TD><TD><input type="password" name="pwd"/></TD></TR> 
           <TR><TD colspan="2"><input type="submit" value='<fmt:message key="submit"/>'/>&nbsp;&nbsp;
           <input type="reset" value='<fmt:message key="reset"/>'/></TD></TR>
      </table>
     
        </form>
      </fmt:bundle>
    </body>
      
    </html>
      

  3.   

    改变页面的编码方式改成UTF-8或者GB1830
      

  4.   

    这个是不是弄了国际化,你的properties文件里的中文有没有改成unicode编码?乱码了最好把所有的页面的编码格式都统一下,还有文件的编码格式也统一
      

  5.   

    http://blog.csdn.net/cl61917380/archive/2011/05/14/6418683.aspx
      

  6.   

    请保证有对应的ASCLL码文件 
      

  7.   

    你的properties文件是怎么写的呀,你都弄国际化了怎么有key=“用户名” 好奇怪的写法呀
      

  8.   

    在属性文件中将汉字转换为Ascaii码,试一下,可以利用jdk/bin/native2ascii.exe转换一下