MyEclipse中修改JSP模板

2012/03/22 2315点热度 0人点赞 0条评论

在MyEclipse 6.X的安装目录下\eclipse\plugins\com.genuitec.eclipse.wizards_6.0.1.zmyeclipse601200710\templates\jsp 目录下找到Jsp.vtl

复制一份,重命名为jsp2.vtl,然后把里面的内容修改为自己想要的格式,保存。

然后在 X:\Program Files\MyEclipse 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.wizards_6.0.1.zmyeclipse601200710 目录下找到templates.xml,

用文本编辑器打开。在

<template context="com.genuitec.eclipse.wizards.jsp"  script="templates/jsp/Jsp.vtl"  name="Default JSP template"/>

下面增加

<template  context="com.genuitec.eclipse.wizards.jsp"  script="templates/jsp/jsp2.vtl"  name="JSP2 template"/>

保存。重启eclipse。

新建jsp,在模板中就会出现JSP2 template,选中,按完成,新建的jsp页面就按你的模板生成了!

也可以直接修改jsp.vtl这样修改的就是默认模板

MyEclipse 中修改servlet模板

在MyEclipse安装目录下\eclipse\plugins\com.genuitec.eclipse.wizards_6.5.0.zmyeclipse650200806\templates

找到Servlet.java文件修改即可

以上是在6.x版本中的修改方法,如果是在其他的版本中直接搜索到wizards修改里面的模板就可以了

yxkong

这个人很懒,什么都没留下

文章评论