修改\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 ...
随机推荐
- Atitit.编程语言的主要的种类and趋势 逻辑式语言..函数式语言...命令式语言
Atitit.编程语言的主要的种类and趋势 逻辑式语言..函数式语言...命令式语言 1. 编程语言的主要的种类 逻辑式语言..函数式语言...命令式语言 1 2. 逻辑式语言,,不必考虑实现过程而 ...
- Nginx的Rewrite正则表达式,匹配非某单词
Nginx的Rewrite正则表达式,匹配非某单词 由于要rewrite一个地址从 /mag/xx/xxx/ -> /m/xxx 但原先 /mag/xx/more/ 要保留 这就得写一个比较奇特 ...
- maven 引入 net sf jsonlib 报错 has borken path
pom.xml 内容: <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json ...
- Bootstrap学习笔记(8)--响应式导航栏
说明: 1. 响应式导航栏,就是右上角的三道杠,点一下下方出现隐藏的导航栏.如果屏幕够大就显示所有的导航选项,如果屏幕小比如手机,就显示部分,剩下的放到三道杠里隐藏. 2. 外面套一个大的div,其实 ...
- mysql学习笔记2--mysql的基本使用
4. 运行和关闭MySQL服务器 首先检查MySQL服务器正在运行与否.在资源管理器查看有没有mysqld的进程,如果MySQL正在运行,那么会看到列出来的 mysqld 进程.如果服务器没有运行,那 ...
- spring boot初步尝试
第一次知道spring boot这个项目是为在学习spring的时候,在官网上看到的,那个时候不知道这个项目是干嘛的,也就没再继续关注了 这些天实习没什么事做,一直没用spring框架了,就想着去官网 ...
- jQuery:(一)jQuery简介
一.jQuery简介jQuery由美国人John Resig于2006年创建jQuery是目前最流行的JavaScript程序库,它是对JavaScript对象和函数的封装. 二.jQuery的优势1 ...
- 树莓派teamviewer远程 windows远程桌面
https://mirror.tuna.tsinghua.edu.cn/help/raspbian/ 用这个源后,再安装 apt-get update https://download.teamvie ...
- python的post请求抓取数据
python通过get方式,post方式发送http请求和接收http响应-urllib urllib2 python通过get方式,post方式发送http请求和接收http响应-- import ...
- 硬件设计之串口收发器---ISO1050 (现行) 隔离式 5V CAN 收发器
http://www.ti.com.cn/product/cn/iso1050 http://www.deyisupport.com/question_answer/dsp_arm/sitara_ar ...