1. 程式人生 > >MyEclipse 中修改JSP模板

MyEclipse 中修改JSP模板

在X:\Program Files\MyEclipse 6.0\myeclipse\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頁面就按你的模板生成了!