修改MyEclipse7.5版本以上中JSP模板

此修改只是针对MyEclipse7.0以上的版本,对于7.0以下的修改,不太一样。网上有教程。

若要修改MyEclipse7.0以上JSP的模板,步骤如下:(我的是8.5的)

 

修改过程中,建议关掉MyEclipse

 

1.找到Genuitec\Common\plugins下的com.genuitec.eclipse.wizards_8.5.0.zmyeclipse75020090612.jar

(

  • "Common"和"MyEclipse 8.5"同在"Genuitec"文件夹下
  • 搜索:com.genuitec.eclipse.wizards,迅速定位到com.genuitec.eclipse.wizards_8.5.0.zmyeclipse75020090612.jar
  • 以防万一,建议先备份那个.jar包

)

2.选择使用WinRAR打开

3.在WinRAR里,依次进入: templates --->jsp

4.最后打开Jsp-html.vtl 和 Jsp.vtl

5.按照自己喜欢的风格,对其进行修改

 

我将其修改如下:

#*---------------------------------------------#
# Template for a JSP as HTML
# @version: 1.2
# @author: Ferret Renaud
# @author: Jed Anderson
#---------------------------------------------#
*#<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" session="true"%>
<%@ page import="java.text.*" %>
<%--
<%@ taglib uri="/struts-tags" prefix="s"%>
--%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>set your title</title>
	<!--
	<link rel="stylesheet" type="text/css" href="CSS.css" />
	<script language="JavaScript" type="text/javascript" src="jquery.js"></script>
	-->	
	<script language="JavaScript" type="text/javascript" src="Macrotea-CommonHelper.js"></script>
	<style type="text/css">
	
	</style>
	
	<script type="text/javascript">
	
	</script>
</head>

<body>


</body>

</html>

 

  

7.如果你喜欢,也可以对html进行修改,使其方便自己。

 

#*---------------------------------------------#
# Template for an HTML file
# @version1.3
# @author Ferret Renaud
# @author Jed Anderson
#----------------------------------------------#
*#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>set your title</title>
<!--
	<link rel="stylesheet" type="text/css" href="CSS.css" />
	<script language="JavaScript" type="text/javascript" src="jquery.js"></script>
-->	
	<script language="JavaScript" type="text/javascript" src="Macrotea-CommonHelper.js"></script>
	<style type="text/css">
	
	</style>
	
	<script type="text/javascript">
	
	</script>
</head>

<body>






</body>

</html>

  

Servlet模板:

 

#---------------------------------------------#
# <aw:description>Template for Servlet</aw:description>
# <aw:version>1.1</aw:version>
# <aw:date>04/05/2003</aw:date>
# <aw:author>Ferret Renaud</aw:author>
#---------------------------------------------#

<aw:import>java.io.IOException</aw:import>
<aw:import>java.io.PrintWriter</aw:import>

<aw:import>javax.servlet.ServletException</aw:import>
<aw:import>javax.servlet.http.HttpServlet</aw:import>
<aw:import>javax.servlet.http.HttpServletRequest</aw:import>
<aw:import>javax.servlet.http.HttpServletResponse</aw:import>

<aw:parentClass>javax.servlet.http.HttpServlet</aw:parentClass>

	private HttpSession session;
	private RequestDispatcher dispatcher;
	
<aw:constructor name="c1">

	public <aw:className/>() {
		super();
	}

</aw:constructor> 
 
<aw:method name="doGet">

	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		/*Prepare*/
		response.setContentType("text/html");
		response.setCharacterEncoding("UTF-8");
		session = request.getSession();
		dispatcher=request.getRequestDispatcher("/servlet/login.do");


	}

</aw:method>

<aw:method name="doPost">

	public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		doGet(request, response);
	}

</aw:method>

<aw:method name="doPut">

	public void doPut(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {

		
	}

</aw:method>

<aw:method name="doDelete">

	public void doDelete(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {

		
	}

</aw:method>

<aw:method name="init">

	public void init() throws ServletException {
		super.init();
	}

</aw:method>

<aw:method name="destroy">

	public void destroy() {
		super.destroy();
		session=null; 
		dispatcher=null;
	}

</aw:method>

<aw:method name="getServletInfo">

	public String getServletInfo() {
		return "This is my default servlet created by Eclipse";
	}

</aw:method>

 

 

 

8.最后WinRAR提示是否保存对jar包的修改,“是”就行了。

 

MyEclipse中默认的文档开头是:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

其对CSS的支持不太好,因此还是改成兼容性好点的,建议从DW中复制过来。

 

10.这下爽了。方便很多了。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
牙科就诊管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了用户在线查看数据。管理员管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等功能。牙科就诊管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。 管理员在后台主要管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等。 牙医列表页面,此页面提供给管理员的功能有:查看牙医、新增牙医、修改牙医、删除牙医等。公告信息管理页面提供的功能操作有:新增公告,修改公告,删除公告操作。公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。药品管理页面,此页面提供给管理员的功能有:新增药品,修改药品,删除药品。药品类型管理页面,此页面提供给管理员的功能有:新增药品类型,修改药品类型,删除药品类型。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值