Part 2: Tomcat Configuration
Author: chSkyrain
l Directory
Directory | Usage |
/bin |
|
/common/lib | JAR files(accessed by server and all web apps) |
/conf |
|
/logs |
|
/server/lib | JAR(accessed by server) |
/server/webapps | Web apps own by server(to manage server) |
/shares/lib | JAR files(all web apps share) |
/temp |
|
/webapps |
|
/work | Compiled servlets |
l Important configuration files
Ø Tomcat-users.xml
<tomcat-users> <role rolename=”” /> <user username=”” password=”” roles=”role1 [,role2…]” /> </tomcat-users> |
Ø Server.xml
Ø /webapps/web.xml
l Tomcat management
[Method] Edit xml with handwork + Platform configuration
Ø Control configuration :configure server and web apps
i) For version before tomcat 6(not supported for later version): configure platform
ii) For later version: /conf/server.xml
n Service
< Server>,<Service>,<Connector>,<Engine>,<Host>,<Context>
n Resource
Data Source, Mail Session, Environment Entry, User Database
n User Definition
Ø Management configuration: issue, start ,stop or uninstall web applications without restart Tomcat server
i) Management platform:
/server/webapps/management --> url: http:/localhost]/manager/
n Message
n Manager
n Application
Path
Display Name
Running
Sessions
Commands
n Deploy
(1) Method one
Context Path |
|
XML configuration file URL |
|
WAR or Directory URL |
|
(2) Method two
Select WAR file to upload
n Server Information
ii) Configuration file:
/webapps/web.xml