MyEclipse 7を修正する.5バージョン以上のJSPテンプレート


この変更はMyEclipse 7のみです.0以上のバージョンでは、7.0以下の修正では、あまり違います.ネット上にチュートリアルがあります.
MyEclipse 7を変更するには.0以上のJSPのテンプレート、手順は以下の通りです:(私のは8.5です)
 
修正中はMyEclipseをオフにすることをお勧めします
 
1.GenuitecCommonpluginsの下の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>

      
    サーブレットテンプレート:
     
    #---------------------------------------------#
    # <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のデフォルトのドキュメントの先頭は次のとおりです.

    CSSのサポートがあまりよくないので、互換性に変更したほうがいいので、DWからコピーすることをお勧めします.
     
    10.これでさっぱりした.ずいぶん便利になりました.