<%@ page language="java" contentType="text/html; charset=UTF-8"
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" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
${cursor}
</body>
</html>
myEclipse自动生成类似这样的,eclipse本身的生成模板改掉更方便一点
本文提供了一个myEclipse生成的典型页面配置示例,包括了如何设置页面的基础路径及引入基本的元数据等内容。该示例展示了使用Java进行Web开发时常见的页面初始化设置。
906

被折叠的 条评论
为什么被折叠?



