资源简介
javaweb服务器, linux 64位 tomcat8.5 . 真的没有什么描述的,直接下载使用就可以了
代码片段和文件信息
/*
* 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(““);
}
}
}
- 上一篇:Android 3D魔方源码
- 下一篇:jsp书店租赁管理系统
相关资源
- javaweb项目 网上连锁药店
- 文件批量上传 jsp jfinal webuploader 在线
- Instant Web Scraping with Java 无水印原版
- Professional Java for Web Applications 无水印
- 基于JSP java web Sql 简单的购物车源代码
- Web版的数据库管理工具
- Javaweb大作业代码
- JavaEE开发环境搭建.docx
- javaweb课程资源管理系统.zip
- apache-tomcat-7.0.63-windows-x64.zip
- Java利用WebSocket实现聊天系统源码
- 小型电子商务系统 jsp java web
- javaweb报告
- j2ee实验-模拟传感器的Web程序-servlet
- 燕山大学计算机专业javaweb课设大学师
- jsp+javabean+servlet实现登录注册以及留言
- javaweb论坛系统
- 网上商城系统后台(jsp+servlet)
- redis-tomcat8以上集群所需要的jar :tomc
- javaweb 基于JSP+Servlet+Mysql的图书管理系
- JavaWeb在线学习平台的设计与实现(毕
- 基于JAVA的人力资源管理系统
- My12306购票系统
- java web 课程设计实验报告.docx
- web版局域网邮件管理系统
- JSP+Servlet+Tomcat个人博客系统
- Java Web高级编程(源码)
- Java Web 网上书店管理系统
- Java web失物招领源代码
- JavaWeb最新最详细思维导图.xmind
评论
共有 条评论