Chapter 7: Web Application Confi guration This would output the current date whenever it is placed in a JSP file. To enable the container to recognize which Java class to invoke when it comes across the tag, you must provide a configuration file that lists the number of arguments the tag can have, its name (in this case, the tag s name is today and the library it belongs to is date). The tag library configuration files have a .tld extension. The configuration of a tag library is the territory of developers and designers, and thus beyond the scope of this blog. The lib Directory This directory contains packaged Java libraries ( .jar files) that the application requires and that are bundled with the application. JAR files that are placed here are available only to the Web application. If the libraries are to be accessed across Web applications, they should be placed under / lib. This is different from earlier Tomcat versions, which had a /shared/libdirectory for libraries that needed to be shared with other Web applications. The following section describes what aspects of the web.xml configuration file you can administer. The META-INF Directory As mentioned, the WEB-INF directory represents the private resources of an application. However, this is not the only directory for private resources. A Web application may have an optional META-INFdirectory that contains deployment information for tools that create war files and resources that applications may rely on. Therefore, a Servlet container will refuse to show the contents of the META-INF directory to a client. The META-INF directory can contain two configuration files: the manifest file ( MANIFEST.MF) and the context file (context.xml). The Manifest File The MANIFEST.MF file is an optional configuration file for a Web application. It contains a list of JAR files on which an application relies. The container can then use this to check for all the required libraries that are to be made available for the Web application. An entry in this text file should be provided as follows, on a single line: Extension-List: extension1 extension2 extension3 Each extension name is separated by a space and is placed as a separate entry in the MANIFEST.MFfile. The entries are named with a prefix, followed by the string -Extension-Name, which is an attribute name, as shown here: extension1-Extension-Name: com.wrox.extension1 extension1-Specification-Version: 1.0 extension1-Implementation-Version: 0.8 extension1-Implementation-Vendor: WROX Press Ltd extension1-Implementation-Vendor-Id: com.wrox extension1-Implementation-URL: http://www.wrox.com/extension1/
For high quality jboss hosting services please check jboss web hosting website.
This entry was posted
on Sunday, March 29th, 2009 at 3:31 pm and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.