domino + servlet+Ajax:servlet接收到的数据有中文乱码?
servlet是在domino环境下运行的,中文乱码的原因应该是没有设置请求参数的编码方式:request.setCharacterEncoding("UTF-8"),但是我在servlet中加入这句代码之后,domino控制台便报如下错误信息:HTTP JVM: java.lang.NoSuchMethodError: javax/servlet/http/HttpServletRequest.setCharacterEncoding(Ljava/lang/String;)V: javax/servlet/http/HttpServletRequest.setCharacterEncoding(Ljava/lang/String;)V
是不是domino下的servlet相关的jar包版本过低?不过我用的domino是8.0.2的版本。试着在notes.ini文件中引入servlet-api.jar还是报相同的错!大家一起帮忙想想有没有解决这个乱码的办法?
--------------------编程问答-------------------- IT500强企业 职位推荐
Title: IT Specialist - Onsite Support
Location: Beijing
Job Description:
- Onsite support or remote support for software product.
Candidate Requirements:
-3+ years implementation/administration/product support experience of at least one of the following products:
1) WebSphere product, WAS certification is pre-request.
2) Lotus product, Lotus certification is pre-request.
-Good communication skills, project management experience is a plus.
-Bachelor's Degree
-English: Fluent
Please email me with your recent Chinese and English CV if you have interest and need more details.
Karen
E-mail:karenlin@haxinternational.com
MSN:karen.shima@hotmail.com
Tel:010-58690411-823
--------------------编程问答-------------------- 简单的办法试试 , 在前台传参的时候把值用escape() 处理下。 --------------------编程问答-------------------- 中文,那么就在本地加编码,到servlet解码` --------------------编程问答-------------------- 用:response.setContentType("text/html; charset=utf-8");
开发中一定不能用:request.setCharacterEncoding("UTF-8")
补充:企业软件 , Lotus