现在的位置: 首页 > 综合 > 正文

myeclipse设置jsp模板

2013年04月09日 ⁄ 综合 ⁄ 共 1023字 ⁄ 字号 评论关闭

用的是MyEclipse9.0
步骤如下:
1:myeclipse9安装目录\Common\plugins\com.genuitec.eclipse.j2eedt.core_9.0.0.me201103181703\templates\velocity\welcome路径下找到Jsp.vtl,复制一份,重命名为struts2.vtl,然后把里面的内容修改为自己想要的格式,保存。然后把该文件复制放到  myeclipse9安装目录\Common\plugins\com.genuitec.eclipse.wizards_9.0.0.me201103012021.jar里的templates\jsp文件夹下面即可。

2:找到  myeclipse9安装目录\Common\plugins\com.genuitec.eclipse.wizards_9.0.0.me201103012021.jar
把jar打开里面的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/struts2.vtl"
        name="Struts2 template"/>

3:重新启动myeclipse 新建jsp,在模板中就会出现Struts2 template,选中,按完成,新建的jsp页面就按你的模板生成!

注意:MyEclipse8.6路径是:安装目录\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\templates\velocity\welcome

模板位置:安装目录\Common\plugins\com.genuitec.eclipse.wizards_8.6.0.me201007140905.jar

http://kingww.iteye.com/blog/1164536

http://iscode.iteye.com/blog/628548

抱歉!评论已关闭.