资源简介
apache-tomcat-8.5.23.tar.gz 【Tomcat服务器,Tomcat8.5 linux版】。linux系统下使用,解压使用。
代码片段和文件信息
/*
* 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“);
response.setCharacterEncoding(“UTF-8“);
try (PrintWriter writer = response.getWriter()) {
writer.println(““);
writer.println(““);
writer.println(“ta charset=\“UTF-8\“ />“);
writer.println(“tle>Sample Application Servlet Page tle>“);
writer.println(““);
writer.println(““);
writer.println(“yle=\“float: left; padding: 10px;\“>“);
writer.println(““);
writer.println(““);
writer.println(“Sample Application Servlet
“);
writer.println(““);
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(““);
}
}
}
相关资源
- 剖析Linux系统下基于NUMA构建的服务
- linux SPI设备注册和驱动小结
- 周立功PCI CAN卡LINUX驱动ubuntu16.04内核
- 实现Windows与Linux两系统间自由切换
- 在双引导Linux系统上实现OS自动切换
- 如何删除Linux系统后找回Windows的启动
- Linux命令详解,循序渐进Linux
- Linux系统文件命令精通指南(下)
- Linux系统命令及Shell脚本实践指南
- RK3308 LINUX开发者指南(1).pdf
- S3C4510 开发板中uCLinux系统开发
- 嵌入式操作系统的解析
- Linux点阵字库和字库生成器.rar
- Tomcat7.0.52绿色版
- Linux-UNIX系统编程手册上、下册中文版
- 基于ARM的电子相册源码含动态库可运
- PSFTP.EXE 工具
- 如何实现Linux与windows文件互传
- Linux内核函数Start_kernel()的功能
- 一只老鸟的嵌入式ARM学习心得
- cximage的linux版本源码
- yaf-2.1.17.tgz
- IBM eServer xSeries 445 EXP400在Linux下的双
- 如何在本地无光驱软驱时通过PXE远程
- Linux操作系统下配置无密码的RSH访问
- 如何利用mdadm在Linux中配置RAID
- db2 v9.5 linux 许可证
- linux telnet服务安装包
- SUSE Linux Enterprise——助力曙光高
- 运行LINUX的中高端HP INTEGRITY服务器
评论
共有 条评论