tomcat 1.支持jsp和servlets的Web服务器 2.还是一个Servlet和JSP容器

因为Tomcat 技术先进、性能稳定,而且免费,因而深受Java 爱好者的喜爱并得到了部分软件开发商的认可,成为目前比较流行的Web 应用服务器。

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选。

对于一个初学者来说,可以这样认为,当在一台机器上配置好Apache 服务器,可利用它响应HTML标准通用标记语言下的一个应用)页面的访问请求。实际上Tomcat 部分是Apache 服务器的扩展,但它是独立运行的,所以当你运行tomcat 时,它实际上作为一个与Apache 独立的进程单独运行的。

 

诀窍是,当配置正确时,Apache 为HTML页面服务,而Tomcat 实际上运行JSP 页面和Servlet(??)。另外,Tomcat和IISWeb服务器一样,具有处理HTML页面的功能,另外它还是一个Servlet和JSP容器,独立的Servlet容器是Tomcat的默认模式。不过,Tomcat处理静态HTML的能力不如Apache服务器。目前Tomcat最新版本为9.0。

 

有错误,但是可以参考

1. Apache是web服务器,Tomcat是应用(java)服务器,它只是一个servlet容器,是Apache的扩展。

2. Apache和Tomcat都可以做为独立的web服务器来运行,但是Apache不能解释java程序(jsp,serverlet)。

3. Apache是普通服务器,本身只支持html即普通网页。不过可以通过插件支持php,还可以与Tomcat连通(单向Apache连接Tomcat,就是说通过Apache可以访问Tomcat资源。反之不然)

4. 两者都是一种容器,只不过发布的东西不同:Apache是html容器,功能像IIS一样;Tomcat是jsp/servlet容器,用于发布jsp及java的,类似的有IBM的webshere、EBA的Weblogic,sun的JRun等等。

5. Apache和Tomcat是独立的,在通一台服务器上可以集成。

打个比方:Apache是一辆卡车,上面可以装一些东西如html等。但是不能装水,要装水必须要有容器(桶),Tomcat就是一个桶(装像Java这样的水),而这个桶也可以不放在卡车上。

Apache只支持静态网页,但像asp,php,cgi,jsp等动态网页就需要Tomcat来处理。

Apache和Tomcat整合使用:如果客户端请求的是静态页面,则只需要Apache服务器响应请求;如果客户端请求动态页面,则是Tomcat服务器响应请求;因为jsp是服务器端解释代码的,这样整合就可以减少Tomcat的服务开销 。

Apache是世界使用排名第一的Web服务器。它可以运行在几乎所有广泛使用的计算机平台上。

Apache 源于 NCSAhttpd服务器,经过多次修改,成为世界上最流行的Web服务器软件之一。Apache取自“a patchy server”的读音,意思是充满补丁的服务器,因为它是自由软件,所以不断有人来为它开发新的功能、新的特性、修改原来的缺陷。Apache的特点是简单、速度快、性能稳定,并可做代理服务器来使用。Apache对Linux的支持相当完美。

Apache有多种产品,可以支持SSL技术,支持多个虚拟主机。Apache是以进程为基础的结构,进程要比线程消耗更多的系统开支,不太适合于多处理器环境,因此,在一个Apache Web站点扩容时,通常是增加服务器或扩充群集节点而不是增加处理器。到目前为止Apache仍然是世界上用的最多的Web服务器,市场占有率达60%左右。世界上很多著名的网站如Amazon.com、Yahoo!、W3 Consortium、Financial Times等都是Apache的产物,它的成功之处主要在于它的源代码开放、有一支开放的开发队伍、支持跨平台的应用(可以运行在几乎所有的Unix、 Windows、Linux系统平台上)以及它的可移植性等方面。

Apache的诞生极富有戏剧性。当NCSA WWW服务器项目停顿后,那些使用NCSA WWW服务器的人们开始交换他们用于该服务器的补丁程序,他们也很快认识到成立管理这些补丁程序的论坛是必要的。就这样,诞生了Apache Group,后来这个团体在NCSA的基础上创建了Apache。如果你准备选择Web服务器,毫无疑问Apache是你的最佳选择。

Tomcat是一个开放源代码、运行servlet和JSP Web应用软件的基于Java的Web应用软件容器。Tomcat Server是根据servlet和JSP规范进行执行的,因此我们就可以说Tomcat Server也实行了Apache-Jakarta规范且比绝大多数商业应用软件服务器要好。

Tomcat是Java Servlet 2.2和JavaServer Pages 1.1技术的标准实现,是基于Apache许可证下开发的自由软件。Tomcat是完全重写的Servlet API 2.2和JSP 1.1兼容的Servlet/JSP容器。Tomcat使用了JServ的一些代码,特别是Apache服务适配器。随着Catalina Servlet引擎的出现,Tomcat第四版号的性能得到提升,使得它成为一个值得考虑的Servlet/JSP容器,因此目前许多WEB服务器都是采用Tomcat。

**JSP=Java Server Pages (Java服务器网页)
**ASP=Active Server Pages (活动服务器网页)
**CGI=Common Gateway Interface (通用网关接口)
**J2EE=Java 2 Platform, Enterprise Edition (Java2平台,企业版)
**XML=eXtensible Markup Language (扩展标记语言)
**IIS=Internet Information Server (互联网信息服务器)

转载于:https://www.cnblogs.com/xuedexin/articles/5611541.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
j2ee应用服务器web服务器解析 j2ee应用服务器web服务器解析 Tomcat服务器一个免费的开放源代码的Web应用服务器。因为Tomcat技术先进、性能稳定且免费,所以深受Java爱好者的喜爱并得到了部分软件开发商的认可,成为目前比较流行的Web应用服务器。下面是关于j2ee应用服务器web服务器,希望大家认真阅读! 一、Tomcat与应用服务器 到目前为止,Tomcat一直被认为是Servlet/JSPAPI的执行器,也就所谓的Servlet容器。然而,Tomcat并不仅仅如此,它还提供了JNDI和JMXAPI的实现机制。尽管如此,Tomcat仍然还不能算是应用服务器,因为它不提供大多数J2EEAPI的支持。 很有意思的是,目前许多的应用服务器通常把Tomcat作为它们ServletJSPAPI的容器。由于Tomcat允许开发者只需通过加入一行致谢,就可以把Tomcat嵌入到它们的应用中。遗憾的是,许多商业应用服务器并没有遵守此规则。 对于开发者来说,如果是为了寻找利用ServletJSP、JNDI和JMX技术来生成JavaWeb应用的话,选择Tomcat一个优秀的解决方案;但是为了寻找支持其他的J2EEAPI,那么寻找一个应用服务器或者把Tomcat作为应用服务器的辅助,将是一个不错的解决方案;第三种方式是找到独立的J2EEAPI实现,然后把它们跟Tomcat结合起来使用。虽然整合会带来相关的问题,但是这种方式是最为有效的。。 二、TomcatWeb服务器 j2ee应用服务器web服务器解析全文共2页,当前为第1页。Tomcat是提供一个支持ServletJSP运行的容器ServletJSP能根据实时需要,产生动态网页内容。而对于Web服务器来说,Apache仅仅支持静态网页,对于支持动态网页就会显得无能为力;Tomcat则既能为动态网页服务,同时也能为静态网页提供支持。尽管它没有通常的Web服务器快、功能也不如Web服务器丰富,但是Tomcat逐渐为支持静态内容不断扩充。大多数的Web服务器都是用底层语言编写如C,利用了相应平台的特征,因此用纯Java编写的.Tomcat执行速度不可能与它们相提并论。 j2ee应用服务器web服务器解析全文共2页,当前为第1页。 一般来说,大的站点都是将Tomcat与Apache的结合,Apache负责接受所有来自客户端的HTTP请求,然后将ServletsJSP的请求转发给Tomcat来处理。Tomcat完成处理后,将响应传回给Apache,最后Apache将响应返回给客户端。 附:关于web服务器和应用服务器的总结,很经典http://www.cnblogs.com/itech/archive/2009/08/18/1548860.html。 总结:以前对tomcat是什么服务器不是很清楚,现在了解了,原来应用服务区和web服务器只是一种概念,界限没有那么清楚,具体的产品可以具体实现自己的功能!例如tomcat。也算是学习了。 j2ee应用服务器web服务器解析全文共2页,当前为第2页。 j2ee应用服务器web服务器解析全文共2页,当前为第2页。 j2ee应用服务器web服务器解析
ServletsJSP核心技术 卷2 内容还是很详细的,看过卷1的人可以继续用这本书深造,呵呵 目录: Chapter 1. Using and Deploying Web Applications Section 1.1. Purpose of Web Applications Section 1.2. Structure of Web Applications Section 1.3. Registering Web Applications with the Server Section 1.4. Development and Deployment Strategies Section 1.5. The Art of WAR: Bundling Web Applications into WAR Files Section 1.6. Building a Simple Web Application Section 1.7. Sharing Data Among Web Applications Chapter 2. Controlling Web Application Behavior with web.xml Section 2.1. Purpose of the Deployment Descriptor Section 2.2. Defining the Header and the Root Element Section 2.3. The Elements of web.xml Section 2.4. Assigning Names and Custom URLs Section 2.5. Disabling the Invoker Servlet Section 2.6. Initializing and Preloading Servlets and JSP Pages Section 2.7. Declaring Filters Section 2.8. Specifying Welcome Pages Section 2.9. Designating Pages to Handle Errors Section 2.10. Providing Security Section 2.11. Controlling Session Timeouts Section 2.12. Documenting Web Applications Section 2.13. Associating Files with MIME Types Section 2.14. Configuring JSP Pages Section 2.15. Configuring Character Encoding Section 2.16. Designating Application Event Listeners Section 2.17. Developing for the Clustered Environment Section 2.18. J2EE Elements Chapter 3. Declarative Security Section 3.1. Form-Based Authentication Section 3.2. Example: Form-Based Authentication Section 3.3. BASIC Authentication Section 3.4. Example: BASIC Authentication Section 3.5. Configuring Tomcat to Use SSL Section 3.6. WebClient: Talking to Web Servers Interactively Section 3.7. Signing a Server Certificate Chapter 4. Programmatic Security Section 4.1. Combining Container-Managed and Programmatic Security Section 4.2. Example: Combining Container-Managed and Programmatic Security Section 4.3. Handling All Security Programmatically Section 4.4. Example: Handling All Security Programmatically Section 4.5. Using Programmatic Security with SSL Section 4.6. Example: Programmatic Security and SSL Chapter 5. Servlet and JSP Filters Section 5.1. Creating Basic Filters Section 5.2. Example: A Reporting Filter Section 5.3. Accessing the Servlet Context from Filters Section 5.4. Example: A Logging Filter Section 5.5. Using Filter Initialization Parameters Section 5.6. Example: An Access Time Filter Section 5.7. Blocking the Response Section 5.8. Example: A Prohibited-Site Filter Section 5.9. Modifying the Response Section 5.10. Example: A Replacement Filter Section 5.11. Example: A Compression Filter Section 5.12. Configuring Filters to Work with RequestDispatcher Section 5.13. Example: Plugging a Potential Security Hole Section 5.14. The Complete Filter Deployment Descriptor Chapter 6. The Application Events Framework Section 6.1. Monitoring Creation and Destruction of the Servlet Context Section 6.2. Example: Initializing Commonly Used Data Section 6.3. Detecting Changes in Servlet Context Attributes Section 6.4. Example: Monitoring Changes to Commonly Used Data Section 6.5. Packaging Listeners with Tag Libraries Section 6.6. Example: Packaging the Company Name Listeners Section 6.7. Recognizing Session Creation and Destruction Section 6.8. Example: A Listener That Counts Sessions Section 6.9. Watching for Changes in Session Attributes Section 6.10. Example: Monitoring Yacht Orders Section 6.11. Identifying Servlet Request Initialization and Destruction Section 6.12. Example: Calculating Server Request Load Section 6.13. Watching Servlet Request for Attribute Changes Section 6.14. Example: Stopping Request Frequency Collection Section 6.15. Using Multiple Cooperating Listeners Section 6.16. The Complete Events Deployment Descriptor Chapter 7. Tag Libraries: The Basics Section 7.1. Tag Library Components Section 7.2. Example: Simple Prime Tag Section 7.3. Assigning Attributes to Tags Section 7.4. Example: Prime Tag with Variable Length Section 7.5. Including Tag Body in the Tag Output Section 7.6. Example: Heading Tag Section 7.7. Example: Debug Tag Section 7.8. Creating Tag Files Section 7.9. Example: Simple Prime Tag Using Tag Files Section 7.10. Example: Prime Tag with Variable Length Using Tag Files Section 7.11. Example: Heading Tag Using Tag Files Chapter 8. Tag Libraries: Advanced Features Section 8.1. Manipulating Tag Body Section 8.2. Example: HTML-Filtering Tag Section 8.3. Assigning Dynamic Values to Tag Attributes Section 8.4. Example: Simple Looping Tag Section 8.5. Assigning Complex Objects as Values to Tag Attributes Section 8.6. Example: Table Formatting Tag Section 8.7. Creating Looping Tags Section 8.8. Example: ForEach Tag Section 8.9. Creating Expression Language Functions Section 8.10. Example: Improved Debug Tag Section 8.11. Handling Nested Custom Tags Section 8.12. Example: If-Then-Else Tag Chapter 9. JSP Standard Tag Library (JSTL) Section 9.1. Installation of JSTL Section 9.2. c:out Tag Section 9.3. c:forEach and c:forTokens Tags Section 9.4. c:if Tag Section 9.5. c:choose Tag Section 9.6. c:set and c:remove Tags Section 9.7. c:import Tag Section 9.8. c:url and c:param Tags Section 9.9. c:redirect Tag Section 9.10. c:catch Tag Chapter 10. The Struts Framework: Basics Section 10.1. Understanding Struts Section 10.2. Setting Up Struts Section 10.3. The Struts Flow of Control and the Six Steps to Implementing It Section 10.4. Processing Requests with Action Objects Section 10.5. Handling Request Parameters with Form Beans Section 10.6. Prepopulating and Redisplaying Input Forms Chapter 11. The Struts Framework: Doing More Section 11.1. Using Properties Files Section 11.2. Internationalizing Applications Section 11.3. Laying Out Pages with Tiles Section 11.4. Using Tiles Definitions Chapter 12. The Struts Framework: Validating User Input Section 12.1. Validating in the Action Class Section 12.2. Validating in the Form Bean Section 12.3. Using the Automatic Validation Framework Developing Applications with Apache Ant Section A.1. Summarizing the Benefits of Ant Section A.2. Installing and Setting Up Ant Section A.3. Creating an Ant Project Section A.4. Reviewing Common Ant Tasks Section A.5. Example: Writing a Simple Ant Project Section A.6. Using Ant to Build a Web Application Section A.7. Example: Building a Web Application Section A.8. Using Ant to Create a WAR File Section A.9. Example: Creating a Web Application WAR File Index
没办法,文件超出上传20M限制 ServletsJSP核心技术 卷2 内容还是很详细的,看过卷1的人可以继续用这本书深造,呵呵 目录: Chapter 1. Using and Deploying Web Applications Section 1.1. Purpose of Web Applications Section 1.2. Structure of Web Applications Section 1.3. Registering Web Applications with the Server Section 1.4. Development and Deployment Strategies Section 1.5. The Art of WAR: Bundling Web Applications into WAR Files Section 1.6. Building a Simple Web Application Section 1.7. Sharing Data Among Web Applications Chapter 2. Controlling Web Application Behavior with web.xml Section 2.1. Purpose of the Deployment Descriptor Section 2.2. Defining the Header and the Root Element Section 2.3. The Elements of web.xml Section 2.4. Assigning Names and Custom URLs Section 2.5. Disabling the Invoker Servlet Section 2.6. Initializing and Preloading Servlets and JSP Pages Section 2.7. Declaring Filters Section 2.8. Specifying Welcome Pages Section 2.9. Designating Pages to Handle Errors Section 2.10. Providing Security Section 2.11. Controlling Session Timeouts Section 2.12. Documenting Web Applications Section 2.13. Associating Files with MIME Types Section 2.14. Configuring JSP Pages Section 2.15. Configuring Character Encoding Section 2.16. Designating Application Event Listeners Section 2.17. Developing for the Clustered Environment Section 2.18. J2EE Elements Chapter 3. Declarative Security Section 3.1. Form-Based Authentication Section 3.2. Example: Form-Based Authentication Section 3.3. BASIC Authentication Section 3.4. Example: BASIC Authentication Section 3.5. Configuring Tomcat to Use SSL Section 3.6. WebClient: Talking to Web Servers Interactively Section 3.7. Signing a Server Certificate Chapter 4. Programmatic Security Section 4.1. Combining Container-Managed and Programmatic Security Section 4.2. Example: Combining Container-Managed and Programmatic Security Section 4.3. Handling All Security Programmatically Section 4.4. Example: Handling All Security Programmatically Section 4.5. Using Programmatic Security with SSL Section 4.6. Example: Programmatic Security and SSL Chapter 5. Servlet and JSP Filters Section 5.1. Creating Basic Filters Section 5.2. Example: A Reporting Filter Section 5.3. Accessing the Servlet Context from Filters Section 5.4. Example: A Logging Filter Section 5.5. Using Filter Initialization Parameters Section 5.6. Example: An Access Time Filter Section 5.7. Blocking the Response Section 5.8. Example: A Prohibited-Site Filter Section 5.9. Modifying the Response Section 5.10. Example: A Replacement Filter Section 5.11. Example: A Compression Filter Section 5.12. Configuring Filters to Work with RequestDispatcher Section 5.13. Example: Plugging a Potential Security Hole Section 5.14. The Complete Filter Deployment Descriptor Chapter 6. The Application Events Framework Section 6.1. Monitoring Creation and Destruction of the Servlet Context Section 6.2. Example: Initializing Commonly Used Data Section 6.3. Detecting Changes in Servlet Context Attributes Section 6.4. Example: Monitoring Changes to Commonly Used Data Section 6.5. Packaging Listeners with Tag Libraries Section 6.6. Example: Packaging the Company Name Listeners Section 6.7. Recognizing Session Creation and Destruction Section 6.8. Example: A Listener That Counts Sessions Section 6.9. Watching for Changes in Session Attributes Section 6.10. Example: Monitoring Yacht Orders Section 6.11. Identifying Servlet Request Initialization and Destruction Section 6.12. Example: Calculating Server Request Load Section 6.13. Watching Servlet Request for Attribute Changes Section 6.14. Example: Stopping Request Frequency Collection Section 6.15. Using Multiple Cooperating Listeners Section 6.16. The Complete Events Deployment Descriptor Chapter 7. Tag Libraries: The Basics Section 7.1. Tag Library Components Section 7.2. Example: Simple Prime Tag Section 7.3. Assigning Attributes to Tags Section 7.4. Example: Prime Tag with Variable Length Section 7.5. Including Tag Body in the Tag Output Section 7.6. Example: Heading Tag Section 7.7. Example: Debug Tag Section 7.8. Creating Tag Files Section 7.9. Example: Simple Prime Tag Using Tag Files Section 7.10. Example: Prime Tag with Variable Length Using Tag Files Section 7.11. Example: Heading Tag Using Tag Files Chapter 8. Tag Libraries: Advanced Features Section 8.1. Manipulating Tag Body Section 8.2. Example: HTML-Filtering Tag Section 8.3. Assigning Dynamic Values to Tag Attributes Section 8.4. Example: Simple Looping Tag Section 8.5. Assigning Complex Objects as Values to Tag Attributes Section 8.6. Example: Table Formatting Tag Section 8.7. Creating Looping Tags Section 8.8. Example: ForEach Tag Section 8.9. Creating Expression Language Functions Section 8.10. Example: Improved Debug Tag Section 8.11. Handling Nested Custom Tags Section 8.12. Example: If-Then-Else Tag Chapter 9. JSP Standard Tag Library (JSTL) Section 9.1. Installation of JSTL Section 9.2. c:out Tag Section 9.3. c:forEach and c:forTokens Tags Section 9.4. c:if Tag Section 9.5. c:choose Tag Section 9.6. c:set and c:remove Tags Section 9.7. c:import Tag Section 9.8. c:url and c:param Tags Section 9.9. c:redirect Tag Section 9.10. c:catch Tag Chapter 10. The Struts Framework: Basics Section 10.1. Understanding Struts Section 10.2. Setting Up Struts Section 10.3. The Struts Flow of Control and the Six Steps to Implementing It Section 10.4. Processing Requests with Action Objects Section 10.5. Handling Request Parameters with Form Beans Section 10.6. Prepopulating and Redisplaying Input Forms Chapter 11. The Struts Framework: Doing More Section 11.1. Using Properties Files Section 11.2. Internationalizing Applications Section 11.3. Laying Out Pages with Tiles Section 11.4. Using Tiles Definitions Chapter 12. The Struts Framework: Validating User Input Section 12.1. Validating in the Action Class Section 12.2. Validating in the Form Bean Section 12.3. Using the Automatic Validation Framework Developing Applications with Apache Ant Section A.1. Summarizing the Benefits of Ant Section A.2. Installing and Setting Up Ant Section A.3. Creating an Ant Project Section A.4. Reviewing Common Ant Tasks Section A.5. Example: Writing a Simple Ant Project Section A.6. Using Ant to Build a Web Application Section A.7. Example: Building a Web Application Section A.8. Using Ant to Create a WAR File Section A.9. Example: Creating a Web Application WAR File Index

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值