java web基础1Tomcat服务器基本知识
<Connector>元素
<Connector>是直接与用户交互的组件,负责接受用户请求和向客户返回响应结果。
在server.xml中的connector标签里可以配置服务器的线程数,最大连接数,等待超时时间等。
属性说明:
属性 |
说明 |
port |
Connector所监听的端口。在浏览器中可以通过输入url:port的方式提交给对应的Connector。因为浏览器的默认端口是80,所以如果把Connector的port设成80的话,可以直接使用url进行访问,不用在后边再跟一个端口号。 |
protocol |
设定Http协议,默认是HTTP/1.1 |
minThreads |
服务器启动时创建的处理用户请求的线程数 |
maxThreads |
可以创建的最大的处理用户请求的线程数 |
minSpareThreads |
最小备用线程数 |
maxSpareThreads |
最大备用线程数 |
acceptCount |
当所有可以使用的处理请求的线程都被用光时,可以放到处理队列中的请求数,超过这个数的请求将不予处理,而返回Connection refused错误。 |
redirectPort |
服务器正在处理http请求时收到了一个SSL传输请求后重定向的端口号。(即当请求是https时,将它转发到的端口) |
enableLookups |
如果为true,表示支持域名解析,则可以在web应用中通过调用request.getRemoteHost()进行DNS查询来得到远程客户端的实际主机名;若为false则不进行DNS 查询,而是返回其ip地址。默认值为true。 |
connectionTimeout |
等待超时的时间数(以毫秒为单位),如果为-1表示不限制客户连接的时间。 |
tomcat服务器会自动管理webapps目录下的所有web应用,并把它映射成虚似目录。
只需要将写好的项目放在tomcat服务器webapps目录下,外界就可以直接访问。
例如:把F盘下的JavaWebDemoProject这个JavaWeb应用直接copy到tomcat服务器webapps目录中,如下图所示:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS8AAAD0CAIAAABFMjfXAAAgAElEQVR4nO196VdTWb72/kte17of7rf7LqGEK/Z9133vaqv7dpdlV1eXiIIMKlRZ1mDXBJZiWYNSWiUvVpeXtpzLUoEEAoIICDLIHJKQBEhIQiAhZA6ZwxTN++EkJ/tMIUAgJ2E/61l6zj6/vfdvD8/Z+xw4P0DGW8dy/tH+f87UIiIixpfgicjQr54PIGxPAJCQTFKAJyJDvH1AiB8ScWYnos/RgaDGJRvPayj36K64Z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uUWHBn3xFUGMjRdub/3uT6GtjhITGqmuj3+8nvhSAX7WvtjZu8csEpEaEhMb/B1ceNVPSVkjvAAAAAElFTkSuQmCC" alt="" data-media-type="image" />
此时Tomcat服务器就会自动为JavaWebDemoProject这个JavaWeb应用映射一个同名的虚拟目录"/JavaWebDemoProject",然后就可以使用浏览器访问这个JavaWeb应用的资源了,
服务器发送回来的数据:
1HTTP/1.1 200 OK
2Server: Apache-Coyote/1.1
3Content-Type: text/html;charset=ISO-8859-1
4Content-Length: 102
5Date: Mon, 19 May 2014 14:25:14 GMT
6 7<html> 8<head> 9<title>JavaWebDemo1</title>10</head>11<body>12 JavaWebDemo1
1314</body>15</html>
图片
http://static.ak.fbcdn.net/rsrc.php/z12E0/hash/8q2anwu7.gif
http://static.ak.fbcdn.net/rsrc.php/zBS5C/hash/7hwy7at6.gif
…
CSS 式样表
http://static.ak.fbcdn.net/rsrc.php/z448Z/hash/2plh8s4n.css
http://static.ak.fbcdn.net/rsrc.php/zANE1/hash/cvtutcee.css
…
JavaScript 文件
http://static.ak.fbcdn.net/rsrc.php/zEMOA/hash/c8yzb6ub.js
http://static.ak.fbcdn.net/rsrc.php/z6R9L/hash/cq2lgbs8.js
图片来自http://www.cnblogs.com/xdp-gacl/p/3734395.html,感谢作者
java web基础1Tomcat服务器基本知识的更多相关文章
- Java Web基础 --- Servlet 综述(理论篇)
摘要: Web 技术成为当今主流的互联网 Web 应用技术之一,而 Servlet 是 Java Web 技术的核心基础.本文首先从请求/响应架构应用的大背景谈起 Servlet 的由来,明确 Ser ...
- java web基础第一次作业
JAVA WEB基础 一.B/S架构 1.B/S架构简介: B是英文单词“Browser”的首字母,即浏览器的意思:S是英文单词“Server”的首字母,即服务器的意思.B/S就是“Browser/S ...
- java web基础环境搭建
java web基础环境包括:(1)servlet容器也即tomcat(2)jre即java程序运行环境 环境变量配置:分别下载jdk和tomcat安装包. jdk环境变量配置: 第一步:系统环境变量 ...
- java web基础 --- URL重定向Filter
java web基础 --- URL重定向Filter httpRequest.getRequestDispatcher("/helloWorld").forward(httpRe ...
- Java Web基础入门
前言 语言都是相通的,只要搞清楚概念后就可以编写代码了.而概念是需要学习成本的. Java基础 不用看<编程思想>,基础语法看 http://www.runoob.com/java/jav ...
- java web基础
WEB基础 C/S:即服务器-客服机(Client-Server)结构.C/S结构通常采用两层结构,服务器负责数据的管理,客户机负责完成与用户的交互任务.客户通过局域网与服务器相连,接受用户的请求,并 ...
- java web(一):tomcat服务器的安装和简单介绍,与eclipse关联
一:下载tomcat安装包和安装 这个百度一下就可以了. 安装完以后进入tomcat的安装路径查看 如图所示:有几个目录简单介绍下 bin目录: 存放运行tomcat服务器的相关命令. conf目 ...
- java web基础之mvc模式设计(一)--使用httpservlet实现mvc分层设计,DAO层使用的是dbutils实现与数据库的链接
一:1.最终的实现效果图: 2.案例的目录结构: 3.案例中使用到的jar包: 二:案例的链接数据库的层次结构关系:数据库是:mysql ,数据库名字:dsm,表格名字:customers 数据库表格 ...
- java web基础知识
1)TCP三次握手 第一次握手:客户端A将标志位SYN置为1,随机产生一个值为seq=J(J的取值范围为=1234567)的数据包到服务器,客户端A进入SYN_SENT状态,等待服务端B确认: 第二次 ...
随机推荐
- Hadoop 中文编码相关问题 -- mapreduce程序处理GBK编码数据并输出GBK编码数据(转)
hadoop的hdfs文件系统中,默认的是utf-8, 故你上传的文件是要设置成utf-8.当输入的是gbk,有该如何? 输入是GBK文件, 输出也是 GBK 文件的示例代码: Hadoop处理GBK ...
- Spring MVC笔记 使用JdbcTemplate
Spring提供了 JdbcTemplate 来封装数据库jdbc操作细节, 包括: 数据库连接[打开/关闭] ,异常转义 ,SQL执行 ,查询结果的转换, 其中体现了 模板模式 的设计模式思想. 使 ...
- hdu 1005:Number Sequence(水题)
Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
- git branch -D 大写的D 删除分支
今天删除本地分支 git branch -d XXX 提示: the branch XXX is not fully merged 原因:XXX分支有没有合并到当前分支的内容 解决方法:使用大写的 ...
- oracle插入数据
插入数据 insert into comm_error_code_def (ID, ERR_MESSAGE, ERR_CODE, ERR_DESC, NAME, MISC_DESC, STATUS, ...
- 简单几何(线段相交)+模拟 POJ 3449 Geometric Shapes
题目传送门 题意:给了若干个图形,问每个图形与哪些图形相交 分析:题目说白了就是处理出每个图形的线段,然后判断是否相交.但是读入输出巨恶心,就是个模拟题加上线段相交的判断,我第一次WA不知道输出要按字 ...
- Task加入取消功能
参考:http://www.cnblogs.com/scy251147/archive/2013/01/04/2843875.html static void TaskWithCancellati ...
- SCU3185 Black and white(二分图最大点权独立集)
题目大概说有几个黑色.白色矩阵,问能选出黑白不相交的矩形面积和的最大值. 建二分图,黑色矩阵为X部的点,白色为Y部,XY的点权都为其矩阵面积,如果有个黑白矩阵相交则它们之间有一条边,那样问题就是要从这 ...
- Week,Month, Year 日期区间辅助类
我们在做一些业务系统的时候,经常会用到一些获取时间段的情况.比如要统计某一周.某月.某年 这样一些时间区间内的一些业务数据.这时候我们就需要获取当前时间段内的一些起止日期.这里分享一个通用的日期辅助类 ...
- Viola Jones Face Detector
Viola Jones Face Detector是Paul viola 和 Michael J Jones共同提出的一种人脸检测框架.它极大的提高了人脸检测的速度和准确率. 速度提升方面:利用积分图 ...