MyEclipse2014如何设置默认生成Encoding为UTF-8格式的JSP文件

来源:互联网 发布:阿里云产品 编辑:程序博客网 时间:2024/06/06 10:47

如图:


这里写图片描述


这里写图片描述


这个时候我们再进行JSP文件的创建,我们会发现,Encoding已经变成了UTF-8如下:


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%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 'MyJsp.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>    This is my JSP page. <br>  </body></html>

祝大家编程顺利!

0 0
原创粉丝点击