Lock screen interview questions 100 days 100 brush, every weekday insist to update the interview questions. Lock screen interview questions app, small program has been launched, website address: https://www.demosoftware.cc/#/introductionPage. It has included all the content of the interview questions updated daily, including the feature of the unlock screen to review the interview questions, daily programming questions email push function and so on. Let you in the interview ahead of the first step, hit the interviewer! Here’s today’s interview question:

==== How to change the default Tomcat port? 1) Go to the conf folder in the Tomcat directory. 2) Go to the conf folder and find the server.xml file. 3) Open the server.xml file ConnectionTimeout =”20000″ port=”8080″ protocol=”HTTP/1.1″ redirectPort=”8443″ uriEncoding=” UTF-8 “/> Port=” 8080″ Change the port you want

==== What are the optimized Connector modes for Tomcat?

Bio: A traditional Java I/O operation that synchronizes and blocks IO. MaxThreads =”150″//Tomcat uses threads to process each request received. This value represents the maximum number of threads that Tomcat can create. The default value is 200. It can be adjusted according to the time performance and memory size of the machine, generally between 400 and 500. The maximum can be around 800. MinSpareThreads =”25″– Number of threads created when Tomcat was initialized. The default value is 4. If there are no idle threads and maxThreads is not exceeded, the number of idle threads to be created at one time. The number of threads created when Tomcat is initialized is also set to this value. MaxSpareThreads =”75″– Once the number of threads created exceeds this value, Tomcat will close the socket threads that are no longer needed. The default value is 50. Once the number of threads created exceeds this number, Tomcat closes the threads that are no longer needed. The number of threads can be roughly calculated by the average number of concurrent user operations per second. AcceptCount =”100″—- specifies the number of requests that can be put on the processing queue when all available threads for processing requests are in use. Any requests that exceed this number will not be processed. The default value is 10. If the number of currently available threads is zero, the request is put into the processing queue. This value limits the size of the request queue, and requests above this value will not be processed. ConnectionTimeout =”20000″ — network connectionTimeout. The default value is 20000, in milliseconds. Setting it to 0 indicates that it will never time out, which is a potential hazard. Typically, the value can be set to 30,000 milliseconds.

Nio: JDK1.4 starts to support synchronous blocking or synchronous non-blocking IO. Specified using NIO model to accept HTTP requests protocol = “org. Apache. Coyote. Http11. Http11NioProtocol” specified please use NIO model to accept HTTP request. Default is BlockingIO, set to protocol=”HTTP/1.1″ acceptorThreadCount=”2″ acceptorThreadCount=”2″ Number of receiving threads when NIO is used aiO (NIO.2) : JDK7 started to support asynchronous non-blocking IO. Apr: Tomcat will greatly improve Tomcat’s handling of static files by invoking the Apache HTTP server’s core dynamic link library as JNI to handle file reading or network transfer operations.
–>

< Connector port = “8080” protocol = “org. Apache. Coyote. Http11. Http11NioProtocol” ConnectionTimeout =” 200000 “redirectPort=”8443” maxThreads= “500” minSpareThreads= “100” maxSpareThreads= “200” acceptCount=”200″ enableLookups=”false” />

Other configurations: maxHttpHeaderSize=”8192″ The maximum amount of HTTP header information. Parts longer than this length are not processed. General 8 k. URIEncoding=”UTF-8″ Specifies the URL encoding format for the Tomcat container. DisableUploadTimeout =”true” Whether to use the timeout mechanism during upload enableLookups=”false”– whether to check the domain name. The default value is true. To improve processing power, set this parameter to false compression=”on” to enable compression, compressionMinSize=”10240″ to enable the output size of compression. Default is 2KB noCompressionUserAgents=”gozilla, Traviata “for the following browsers, Do not enable compression compressableMimeType = “text/HTML, text/XML, text/javascript, text/CSS, text/plain” which some of the resource type needs to be compressed

==== How many deployment modes of Tomcat are available? First: directly copy the Web project files (typically the generated WAR package) into the Webapps directory of Tomcat. The second: In the local tomcat conf directory, create a new directory Catalina/localhost, and create an XML file in the directory. The name of the file must be the same as the name of the path, and the name should be test.xml. Its specific contents are as follows:
Add a context to the
node.

==== How does the Tomcat container create an instance of the Servlet class? What principle is used? When the container starts, it reads the web.xml file for all web applications in the Webapps directory, parses the XML file, and reads the servlet registration information. The servlet classes registered in each application are then loaded and instantiated by reflection. If the value is positive, the loadOnStartup parameter will be instantiated at the beginning of the servlet registration. When the Web container starts, the loadOnStartup parameter will be instantiated in ascending order. If the value is not written or is negative, the loadOnStartup parameter will be instantiated on the first request.

More interview questions and learning resources can be found on my homepage or in the comments