The virtual host that supports JSP by Tomcat, the directory structure is as follows: / www / hosts ├Ost1 │ ├tml │ ├Webapps │ └logs └host2 ├HTML Webapps └logstomcat configuration file related content: Host> debug =" 0 "appbase =" / www / hosts / host2 / webapps "unpackwars =" true "autodeploy =" true "> host> Add the following in $ catalina_home / conf / catalina.policy file: Grant CodeBase "File: / www / hosts / host1 / -" {Permission java.io.filepermission "file: / www / hosts / host1 / -", "write";}; grant code "file: / www / host code" file: "{permission java.io.filepermission" file: / www / hosts / host2 / - "," write ";}; ok, start Tomcat $ CATALINA_HOME / BIN / CATALINA.SH Start -Security with the following command At this time, the JSP / servlet in the virtual host Host1 can only be modified / www / The file in the hosts / host1 directory, the JSP / servlet in the virtual host Host2 can only modify the files in the / www / hosts / host2 directory to reach the purpose of isolating individual virtual hosts. The above content is only passed in this machine (WinXP Pro Tomcat 5.0.12).