> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Wang Penghui > Subject: Re: "File not found" with file include in a jsp file. > > I am sorry that, i could not understand what's your mean. > Maybe i am not so smart enough, could you mind explain it > for me in detail again.
First, the deployment rules concerning appBase, docBase, <Context>, etc., have changed significantly between 4.1 and 5.5. The current rules are much more strict, and certain errors in older Tomcat versions that may have resulted in acceptable behavior but went against the spec have been corrected. The appBase attribute of the <Host> element specifies the default directory under which apps are deployed. However, no app or portion thereof (e.g., a .jsp, .html, .css) may be placed directly in the docBase directory, unless the app is packaged in a .war file. By default, appBase is set to CATALINA_HOME/webapps; if you examine this directory on a clean Tomcat installation, you will note that it contains nothing other than subdirectories, since the sample apps that come with Tomcat are expanded, not deployed as .war files. Apps normally are placed in subdirectories (or .war files) under appBase; the name of the subdirectory (or .war file) is the URI path to the app. The one exception to this is the default app, which must be in the webapps/ROOT subdirectory (or webapps/ROOT.war file). When an app is deployed under appBase, its <Context> element should appear in the META-INF/context.xml file of the app, and should not contain either a path or docBase attribute. Alternatively, the <Context> element may be placed in a file called [appname].xml within conf/[engine]/[host] (by default, conf/Catalina/localhost). Such a <Context> should not contain a path attribute, and should only use a docBase attribute if the app is deployed in a location other than under the appBase directory. Finally, the <Context> element may appear inside a <Host> element in server.xml (for compatibility with 4.1), but that practice is strongly discouraged, since it requires a restart of Tomcat to make any changes. In this last case, the <Context> element must specify both path and docBase attributes. Documentation can be found here: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]