我有一个jsp --比如hello.jsp。现在有两个用例
- The charset=UTF-8 encoding has been set in HTML tag of the jsp.
- I have tried to see how form is being submitted through javascript and the chinese text remains the same just before "submit". I don't know what happens that it is not being rendered after this.
有什么建议或建议吗?
发布于 2011-06-22 19:57:25
你试过page标签了吗?
示例:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>Obs:,您需要将它放在您使用的每个页面的顶部。
PS:如果您认为可以在header.jsp文件中添加上一行,然后在所需的文件中添加include头文件,如下所示:
<jsp:include page="/resources/header.jsp" /> 除非您在每一页中添加该行,否则它将无法工作。
https://stackoverflow.com/questions/6445610
复制相似问题