Tomcat( a key )

Tomcat It's a match for Java EE Web Standard minimum web Containers , be-all jsp The program must have WEB Container support can be run , And in the given WEB The container will support transaction operations .

Tomcat By Apache Provided (www.apache.com).

1.1Tomcat install

If you want to install Tomcat Before , Please turn off the virus firewall of this machine first . And make sure there's already... On the computer JDK(Tomcat There has to be JDK Support for , without , Unable to run ).

1.2Tomcat Catalog

l  bin: Save the path of all executable programs ;

l  conf: Save all profile information ;

l  lib: Save the third party's *.jar file , It can be understood that this directory is CLASSPATH;

l  logs: Save all server log information , If the server has an error , You can use the .log The file to view ;

l  webapps: Hot deployment path of the project ;

l  work: Save all generated temporary files , The contents of this folder can be emptied at any time .

1.3Tomcat Configure virtual directory ( The core )

When Tomcat After the installation is complete , In fact, it can't develop the project right now , Often need to be right tomcat To configure , Each virtual directory can be understood as the workspace of a project ( Written by hand ), The configuration is as follows :

1、  Create a destination folder in the right place on the disk , And use this folder as the development path of the project ;

2、  If you want to be WEB The development path of the project , Then you need to save a... In this file directory WEB-INF At the same time, you need to provide a web.xml file .

l  This file and folder can be accessed directly through Tomcat\webapps\ROOT Copy under Directory

3、  modify conf/server.xml file , In this file, you need to configure the path of the virtual directory , stay 138 Yes </host> Write code on top of ;

The meaning of this configuration is as follows :

l  “<Context>”: Indicates to configure a context ( Virtual directory )

l  Path attribute : Represents the access path of the browser , visit :http://localhost:8080/mywebs;

l  docBase attribute : The path of the configured folder , There must be... In this location WEB-INF Catalog ;

4、  If you want the virtual directory to work , You have to Tomcat Restart , In the future, as long as it is revised Tomcat Medium .xml file , It also has to be restarted Tomcat Can be loaded into the new configuration .

5、  In theory, the above configuration can be used . But now there's a little problem , from Tomcat6.x After the version , By default, if the user accesses the path , You can't browse all the files in this path directly , If you want to turn on browse mode , It needs to be modified conf/web.xml file ;

6、  Change the default port number , route conf/server.xml

Tomcat More articles about knowledge points

  1. Tomcat Summary of knowledge points

    Tomcat  Learning notes . The relevant configurations in this paper are tomcat8  Next , Other versions may be slightly different . If there is any mistake, please forgive me . framework First , Take a look at the architecture Let's briefly explain . Server: The server .Tomcat  It's just one. ...

  2. tomcat Knowledge point

    (1) Use thread pool    Servlet The engine creates an isolated thread for each request , Assign this thread to service() Method , Remove this thread after it has finished executing . By default ,servlet engine Create a new thread for each request . Because of creation ...

  3. Java Web Study ( Twelve )Tomcat The core

    One . introduction In fact, according to the truth , Study Java web We should write about it in the previous section tomcat Related knowledge , But recently I read some information , I just used to know how to use tomcat To post my project , I didn't summarize some details , this ...

  4. 2、MyEclipse and Eclipse tuning ,MyEclipse To configure (tomcat and jdk Memory settings for ),jar Introduce relevant knowledge points , take Java Project programming web Project approach

    1.WindowàPreferenceàGeneralàWorkspaceàText file encoding Such as UTF-8 2.WindowàPreferenceàGeneralàEdito ...

  5. Tomcat To configure ( Some knowledge points )

    1.<Server> Elements ,shutdown Property means to turn off Server Instructions :port Attribute representation Server receive shutdown Port instruction number , Set to -1 You can disable this port 2.Connector The main ...

  6. tomcat Related knowledge

    Tomcat The server is a free open source Web application server , Application servers are lightweight , It is widely used in small and medium-sized systems and where there are not many concurrent users . tomcat File structure : bin: For storing startup and shutdown tom ...

  7. Tomcat Summary of some knowledge points

    * Tomcat:web Server software     1. download :http://tomcat.apache.org/    2. install : Just unzip the package . * Be careful : It is recommended that the installation directory should not have Chinese and spaces    3. uninstall ...

  8. Servlet Loaded at startup tomcat Source code ( original )

    tomcat 8.0.36 Knowledge point : By configuring loadOnStartup You can set Servlet Whether in Tomcat Load on startup , And orderly loading by value size , Its minimum effective value is 0, The maximum effective value is Integer.MA ...

  9. Servlet Containers Tomcat in web.xml in url-pattern Configuration details [ With source code analysis ]

    Catalog Preface The phenomenon Source code analysis Practical examples summary Reference material Preface I studied it today tomcat On web.xml In profile url-pattern The problem of . This problem actually bothered me before graduation , I was busy looking for a job . Find a job ...

Random recommendation

  1. SQL Server Database maintenance ( Four )__ The cursor (cursor)

    -- Maintain database -- -- The cursor (cursor)-- -- summary : notes : Use select The result set of statement query results is a whole , If you want to process one line or one branch at a time , Cursors can provide this processing mechanism . You can think of a cursor as a pointer . The pointer ...

  2. lua Special use in

    th> a=torch.zeros(,) [.0001s] th> a [torch.DoubleTensor of size 1x5] [.0001s] th> a[{,floor ...

  3. js foreach Than for Two more undefined

    Found in project ,javascript use foreach than for Two more undefined, // Two more undefined for (var i in _SysFunctions_S) {} // normal ...

  4. hdu 2519 Freshman party Permutation and combination

    Reduce one-time large value calculation through phased calculation #include <stdio.h> int main() { int t, a, b, i; __int64 c; scanf("%d&qu ...

  5. turn Use HttpClient 4 Upload files

    http://www.tuicool.com/articles/Y7reYb 1. summary In this tutorial we will describe how to use  HttpClient 4 Carry out a multi file upload operation  . We will use   http://ec ...

  6. hive in left/right join on Connecting and And where The use of

    Many students are doing table Association ,and and where Sometimes it's hard to distinguish the use of , Record it here . Create personnel information table and write data create table tmp.userinfo(id string,name str ...

  7. The programmer 50 topic (JS edition )( 5、 ... and )

    Program 21: There's a sequence of scores :2/1,3/2,5/3,8/5,13/8,21/13... Find the front of this sequence 20 Sum of items . var arr=[]; var count=20; for(var i=0;i<= ...

  8. webpack Configure the cache

    1. The filename of the output file Add hash 2. Extract the bootstrap template 3. Module identifier https://webpack.docschina.org/guides/caching/#src/components/Sideb ...

  9. How to use Chrome Browser debug dynamically loaded Javascript Script

    stay IE in , You can see one at the bottom of the debugger's documentation list " Dynamic scripts " Folder , You can find dynamically loaded scripts in it , however ... A large number of , You can't customize the name ... But in Chrome in , It seems that I can't find it at all ...

  10. 【343】MathJax、LaTex、Mathml The mathematical formula

    Reference resources :cnblog Add mathematical formula support to Classification reference : 1.  Basic function MathJax my LaTeX introduction MathJax basic tutorial and quick reference Piecewise functions : Moment ...