MyEclipse 2016 发布jsp时,多出好多无关内容

小灰狼 2017-07-03 03:15:08
我的MyEclipse 版本信息:
MyEclipse Enterprise Workbench
Version: 2016 CI 3

jsp 源文件:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
contentType="text/html; charset=UTF-8"%><% String path = request.getContextPath(); %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<body>
<b>汉字</b>
</body>
</html>



发布到 tomcat 之后,莫名其妙地被修改了内容,并且我源文件是存为 UTF8 编码格式的,发布之后成了 “系统默认”,导致服务端生成后在客户端成了乱码:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"

contentType="text/html; charset=UTF-8"%><% String path = request.getContextPath(); %>

<!DOCTYPE html>

<html data-genuitec="wc2-1-1">

<head data-genuitec="wc2-1-2">

<meta charset="UTF-8" data-genuitec="wc2-1-3"/>

<script data-genuitec="wc2-1-4">
//<![CDATA[
/*
* Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/

中间省略大量的 javascript 内容

//]]>
</script></head>
<body data-genuitec="wc2-1-5">
<b data-genuitec="wc2-1-6">汉字</b>
</body>
</html>

...全文
187 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yb60513 2017-07-03
  • 打赏
  • 举报
回复
我也遇到了类似的问题,jsp页面在发布后head标签内被加入了javascript脚本并且报脚本错误。解决的方法是在“servers”中选中对应的tomcat,右键点开菜单,再左键点击“CodeLive”或者“live preview”即可关闭myeclipse2016默认开启的代码实时预览功能。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧