zoukankan      html  css  js  c++  java
  • eclipse乱码问题

    工作空间编码

    Preference——>General——>Workspace

    单个项目编码

    右击项目

    Resource

    Other

    单个文件编码

    同上,右击那个文件即可,其他与上面一样

    改变jsp模板

    再改一下jsp默认模板的编码格式

    Windows——>Preference——>Web——>JSP Files——>Editor——>Templates

    修改

    将 encoding写死

    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
    ${cursor}
    </f:view>
    </body>
    </html>

     补充:

    Preferences直接搜搜jsp

    encoding 选择utf-8

  • 相关阅读:
    Tomcat安装和使用
    mysql5.7.18安装配置
    Memcached安装与使用
    Redis
    nginx的安装与使用
    python操作mysql
    Paramiko模块
    协程与异步IO
    Queue与生产者消费者模型
    C# 生成验证码 方法二
  • 原文地址:https://www.cnblogs.com/phdeblog/p/14050022.html
Copyright © 2011-2022 走看看