zoukankan      html  css  js  c++  java
  • What does the Container give you?

    We know it is the Container that manages and runs the servlet,but why? Is it worth the extra overhead?

    Communications support: The container provides an easy way for your servlets to talk to your web server. You do not have to build a ServerSocket,listen on a port, create streams,etc. The  Container knows the protocol between the web server and itself,so that your serlet does not have to worry about an API between , say, the Apache web server and your own web application code. All you have to worry about is your own business logic that goes in your Servlet(like accepting an order from your online store)

    Lifecycle Management  The Container controls the life and death of your servlets.It takes care of loading the classes,instantiating and initializing the servlet, invoking the servlet methods ,and making servlet instances eligible for garbage collection.With the Container in control,you do not have to worry as much about resource management.

    Multithreading Support The Container automatically creates a new Java thread for every sevlet request it receives. When the servlet`s done running the HTTP service method for that client`s request,the thread completes. 

    Declareative Security With a Container ,you get to use an XML deployment descriptor to configure security without having to hard-code it into your servlet class code.

    Jsp Support:The Container takes care of translating Jsp code into real Java.

  • 相关阅读:
    笔记本出现故障,蓝屏状态中 沧海
    Form Head Data 沧海
    西门子索毕业生30万违约金败诉 被指培训名不副实 沧海
    Questions about purchasing 沧海
    甲骨文Bosma先生谈托管型CRM 沧海
    有关T型账户 沧海
    到岸成本 沧海
    紧张的学习 沧海
    SOA仍旧看着很美 沧海
    心情变得很糟糕 沧海
  • 原文地址:https://www.cnblogs.com/wrh526/p/2154468.html
Copyright © 2011-2022 走看看