资源简介
Tomcat7.0版本,个人感觉最好用的,开发web网页必备。
代码片段和文件信息
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License Version 2.0
* (the “License“); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package mypackage;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Simple servlet to validate that the Hello World example can
* execute servlets. In the web application deployment descriptor
* this servlet must be mapped to correspond to the link in the
* “index.html“ file.
*
* @author Craig R. McClanahan
*/
public final class Hello extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* Respond to a GET request for the content produced by
* this servlet.
*
* @param request The servlet request we are processing
* @param response The servlet response we are producing
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
@Override
public void doGet(HttpServletRequest request
HttpServletResponse response)
throws IOException ServletException {
response.setContentType(“text/html“);
PrintWriter writer = response.getWriter();
writer.println(““);
writer.println(““);
writer.println(“tle>Sample Application Servlet Page tle>“);
writer.println(““);
writer.println(““);
writer.println(““);
writer.println(““);
writer.println(““);
writer.println(““);
writer.println(“ “);
writer.println(““);
writer.println(“Sample Application Servlet
“);
writer.println(“This is the output of a servlet that is part of“);
writer.println(“the Hello World application.“);
writer.println(“ “);
writer.println(“ “);
writer.println(“
“);
writer.println(““);
writer.println(““);
}
}
- 上一篇:矩阵论经典教材
- 下一篇:cloud compare用户手册中文+英文
相关资源
- [精品]鸟哥的Linux私房菜:服务器架设
- 多线程TCP服务器运行程序
- Tomcat7.zip
- tomcat8
- 戴尔14代服务器2008 R2驱动.zip
- apache-tomcat-8.5.37-windows-x64
- CH_WEB3.0控件开发包V1.1.0_x86_x64
- apache-tomcat-7.0.42和jdk-7u79-linux-x64
- 勤哲EXCEL2017服务器完美安装破解教程
- Server_Side_Swift_with_Vapor_v2.1中文版.pdf
- Web服务器攻击分析报告
- tomcat_v8.0.21
- Spring+CXF+tomcat开发webservice
- FMS4.5破解版流媒体服务器FlashMediaSer
- VSCodeUserSetup-x64-1.41.1 (1).exe
- 超融合服务器采购商务+技术标书含华
- Hi3518采集摄像头图片并把Hi3518当作R
- 麻将源码包括服务器
- 21-Linux系统管理及服务器配置PPT.rar
- SecureCRT、SecureFX
- OPC.服务器模拟器
- tomcat系列
- carte子服务器配置软件:yajsw-stable-1
- 基于STM32F407的web服务器,可进行设备
- OPC服务器测试软件
- 图灵书籍(Node.js开发指南.pdf+Node We
- 鸟哥的Linux私房菜-服务器架设篇(第
- DELL机架式服务器最新Viso模具
- HelixServerUnlimite(Helix server 11 for Wind
- 基于workerman做的一套软硬件相结合的
评论
共有 条评论