修改\Servlet和Jsp模板的方法
1.在MyEclipse6.6\myeclipse\eclipse\plugins下
找到com.genuitec.eclipse.wizards
2.templates\
替换Servlet.java
#---------------------------------------------#
# <aw:description>Template for Servlet</aw:description>
# <aw:version>1.1</aw:version>
# <aw:date>04/05/2003</aw:date>
# <aw:author>Guo Ming</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> <aw:constructor name="c1">
/**
* Constructor of the object.
*/
public <aw:className/>() {
super();
} </aw:constructor> <aw:method name="doGet"> public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { } </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">
/**
* The doPut method of the servlet. <br>
*
* This method is called when a HTTP put request is received.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPut(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { // Put your code here
} </aw:method> <aw:method name="doDelete">
/**
* The doDelete method of the servlet. <br>
*
* This method is called when a HTTP delete request is received.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doDelete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { // Put your code here
} </aw:method> <aw:method name="init">
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
// Put your code here
} </aw:method> <aw:method name="destroy">
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
} </aw:method> <aw:method name="getServletInfo">
/**
* Returns information about the servlet, such as
* author, version, and copyright.
*
* @return String information about this servlet
*/
public String getServletInfo() {
return "This is my default servlet created by Eclipse";
} </aw:method>
3.templates\jsp
替换Jsp.vtl
#*---------------------------------------------#
# Template for a JSP
# @version: 1.2
# @author: Ferret Renaud
# @author: Guo Ming
#---------------------------------------------#
*#<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
</body>
</html>
修改\Servlet和Jsp模板的方法的更多相关文章
- ajax 异步 通信 小例子 servlet与 jsp异步 post方法
post请求 url后面加参数 接收不到的,必须 放到send("use"=user)形式 还要加上 xhr.setRequestHeader("Content-Type ...
- 如何修改Myeclipse的JSP模板
先找到MyEclipse的安装目录, 再找到myeclipse/eclipse/plugins/com.genuitec.eclipse.wizards_5.1.0/templates/jsp (co ...
- 修改myeclipse的jsp模板
在myeclipse的安装目录下: C:\Users\Seeker\AppData\Local\MyEclipse Professional\plugins 找到com.genuitec.eclips ...
- IDEA修改Servlet的代码生成模板
file--->settings,打开settings面板
- 修改MyEclipse默认的Servlet和jsp代码模板
一.修改Servlet的默认模板代码 使用MyEclipse创建Servlet时,根据默认的Servlet模板生成的Servlet代码如下: 1 package gacl.servlet.study; ...
- 转】MyEclipse使用总结——修改MyEclipse默认的Servlet和jsp代码模板
原博文出自于: http://www.cnblogs.com/xdp-gacl/p/3769058.html 感谢! 一.修改Servlet的默认模板代码 使用MyEclipse创建Servlet时, ...
- MyEclipse使用总结——修改MyEclipse默认的Servlet和jsp代码模板
http://www.cnblogs.com/xdp-gacl/p/3769058.html 孤傲苍狼 只为成功找方法,不为失败找借口! MyEclipse使用总结——修改MyEclipse默认的 ...
- 如何在MyEclipse中更改servlet模板 Jsp模板
http://blog.csdn.net/sjw890821sjw/article/details/6995190 刚换上Myeclipse9.0,结果要修改servlet模板的时候不像Myeclps ...
- JavaWeb学习之Servlet(二)----Servlet的生命周期、继承结构、修改Servlet模板
[声明] 欢迎转载,但请保留文章原始出处→_→ 文章来源:http://www.cnblogs.com/smyhvae/p/4140466.html 一.http协议回顾: 在上一篇文章中:JavaW ...
随机推荐
- Vmware linux 无法上网
流程如下: 1)点击 VM->Settings Hardware选项卡下面 2)点击Network Adapter 设置如下图所示,首先我们在虚拟机中将网络配置设置成NAT, 3.进入Windo ...
- 1、Reactive Extensions for .NET(译)
注:本文的工程是基于 vs2010 的,在 vs2012 中区别不大. 本文的意图是让读者熟悉 Reactive Extension for .net(Rx) 的使用.通过一系列的例子,让读者感受 基 ...
- boost 库的安装
一.windows下 环境:win7 64位 方法1:使用.exe类型的boost进行安装,也就是编译过得,这种方法最简单.下载后直接执行.exe就行了. http://sourceforge.net ...
- 【转】oozie安装和自带示例的使用
oozie安装 [转]http://www.tuicool.com/articles/qUVNJn oozie自带示例的使用 [转]http://blog.csdn.net/zhu_xun/artic ...
- SAP ERP 6.0 EHP7 SR2(WINDOWS MSSQL版)安装说明
原文 by 枫竹丹青 ⋅ 1.安装准备 1.1.版本说明 本文是描述在一个Windows虚拟机.SQL Server数据库环境下,安装SAP ERP 6.0 EHP7 SR2服务器,安装完成虚拟机文件 ...
- 区别:Use MFC In A Shared DLL 和 Use MFC In A Static Library
摘自:Programming Windows with MFC, 2nd Edition Choosing Use MFC In A Shared DLL minimizes your applica ...
- 解决:Scanner输入数字总是莫名其妙多个0
用BufferedInputStream解决 Scanner scanner = new Scanner(new BufferedInputStream(System.in)); System.out ...
- 重启php
注意这是重启php,不是重启apache service php-fpm restart
- Nginx + Lua + 共享内存
转自:http://blog.csdn.net/lxb_champagne/article/details/17099383 lua_package_path "/usr/local/sha ...
- EasyUI Tree checkbox node
tree插件允许你创建checkbox tree,如果你点击节点的checkbox,被点击的节点信息得到下和上的继承.例如,点击tomato节点的checkbox,你可以看到vegetables节点现 ...