eclipse新建jsp页面默认模板设置
2014-05-07 16:52
351 查看
设置步骤如下: eclipse -- >perferences - >web ->jsp - jsp files -Editor ->templates 在这里可以设置模板
![](https://img-blog.csdn.net/20140507165122625?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDIyMjMxOA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](https://img-blog.csdn.net/20140507165058640?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDIyMjMxOA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
代码:
<%@ page language="java" contentType="text/html; charset=${encoding}" pageEncoding="${encoding}"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="-1">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">
<title>Insert title here</title>
</head>
<body>
${cursor}
</body>
</html>
代码:
<%@ page language="java" contentType="text/html; charset=${encoding}" pageEncoding="${encoding}"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="-1">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">
<title>Insert title here</title>
</head>
<body>
${cursor}
</body>
</html>
相关文章推荐
- ECLIPSE - 新建jsp页面默认模板设置
- ECLIPSE - 新建jsp页面默认模板设置
- ECLIPSE - 新建jsp页面默认模板设置
- eclipse --- 新建JSP页面默认模版设置
- Eclipse设置新建jsp文件默认模板
- eclipse设置新建jsp页面默认编码
- eclipse for javaEE - 新建jsp页面模板设置
- Eclipse 设置新建jsp文件的默认模板
- Eclipse中设置新建jsp页面时的默认编码
- Eclipse 设置新建jsp文件的默认模板
- eclipse --- 新建JSP页面默认模版设置
- eclipse、MyEclipse 中怎么设置JSP页面的默认编码
- eclipse设置新建jsp文件默认字符编码为utf-8
- eclipse设置新建jsp文件默认字符编码为utf-8
- eclipse 3.5.2版本中怎么设置JSP页面的默认编码
- eclipse设置新建jsp文件默认字符编码为utf-8
- MyEclipse中JSP模板默认页面编码设置显示中文
- eclipse设置新建jsp文件默认字符编码为utf-8
- MyEclipse开发平台下如何将新建的JSP页面的默认编码格式设置为UTF-8--JSP
- eclipse设置新建jsp文件默认字符编码为utf-8