1、index.jsp

<form action="hello" method="post" >

    你好:<input type="text" id="name" name="name"></input>

    <input type="submit" value="提交"></input>

    </form>

2  hello.java

    

 @RequestMapping(value="/hello")

        public String hello(@RequestParam("name") String name,Map<String ,String> context) throws UnsupportedEncodingException{

        //String name1 =  name.toString("file.encoding","utf-8"); 

        String encoding = System.getProperty("file.encoding");  

            

          // name=java.net.URLDecoder.decode(name,"");

           System.out.println("系统默认的字符集是:" + name+encoding); 

          //  System.out.println(name.Encoding("utf-8"));  

           context.put("username", name);

            return "hello";

        }

3 <div>${username}</div>