<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>4.7 Web Application Manifest Processing</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Virgo Programmer Guide"><link rel="up" href="ch04.html" title="4. Developing Applications"><link rel="prev" href="ch04s06.html" title="4.6 Programmatic Access to the Servlet Context"><link rel="next" href="ch04s08.html" title="4.8 Working with Dependencies"><!--Begin Google Analytics code--><script type="text/javascript"> | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
</script><script type="text/javascript"> | |
var pageTracker = _gat._getTracker("UA-2728886-3"); | |
pageTracker._setDomainName("none"); | |
pageTracker._setAllowLinker(true); | |
pageTracker._trackPageview(); | |
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.7 Web Application Manifest Processing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s06.html">Prev</a> </td><th width="60%" align="center">4. Developing Applications</th><td width="20%" align="right"> <a accesskey="n" href="ch04s08.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="developing-applications-automatic-imports-web"></a>4.7 Web Application Manifest Processing</h2></div></div></div><p> | |
Virgo Server for Apache Tomcat generates automatic package imports (i.e., via the | |
<code class="literal">Import-Package</code> manifest header) for certain web applications. | |
This section lists which packages are automatically generated. | |
</p><p> | |
VTS supports Web Application Bundles (WABs) as defined by the OSGi Web Applications Specification and WAR files. | |
A WAR will typically not contain any OSGi defined manifest headers. | |
A WAB is distinguished from a WAR by the presence of one or more of the following OSGi defined headers: | |
</p><div class="itemizedlist"><ul type="disc"><li><code class="literal">Bundle-SymbolicName</code></li><li><code class="literal">Bundle-Version</code></li><li><code class="literal">Bundle-ManifestVersion</code></li><li><code class="literal">Import-Package</code></li><li><code class="literal">Web-ContextPath</code></li></ul></div><p> | |
</p><p> | |
As required by the OSGi Web Applications specification, the following defaults are applied to a WAR: | |
</p><div class="itemizedlist"><ul type="disc"><li><code class="literal">Bundle-ManifestVersion</code> is set to <code class="literal">2</code></li><li><code class="literal">Bundle-SymbolicName</code> is generated from the path from which the bundle was installed | |
</li><li><code class="literal">Bundle-ClassPath</code> is set to <code class="literal">WEB-INF/classes</code> followed by the JARs in | |
<code class="literal">WEB-INF/lib</code> in an unspecified order, followed by any transitive dependencies declared | |
by the JARs in <code class="literal">WEB-INF/lib</code></li><li><code class="literal">Import-Package</code> is extended in an implementation defined way, as described below | |
</li></ul></div><p> | |
</p><p> | |
The following packages are automatically imported into WARs: | |
</p><div class="itemizedlist"><ul type="disc"><li><code class="literal">javax.servlet;version="2.5"</code></li><li><code class="literal">javax.servlet.http;version="2.5"</code></li><li><code class="literal">javax.servlet.jsp;version="2.1"</code></li><li><code class="literal">javax.servlet.jsp.el;version="2.1"</code></li><li><code class="literal">javax.servlet.jsp.tagext;version="2.1"</code></li><li><code class="literal">javax.el;version="1.0"</code></li></ul></div><p> | |
</p><p> | |
In addition to the above-described imports, VTS will also | |
generate automatic imports for all of the packages that are exported by the system | |
bundle, unless an import for the package already exists in the WAR’s manifest, | |
or the WAR contains the package, i.e. within <code class="literal">WEB-INF/classes</code>, | |
or in a jar file in <code class="literal">WEB-INF/lib</code>. When an import is generated, it | |
is versioned such that it exactly matches the version or versions of the package that | |
are exported from the system bundle. For example, a package that’s exported only at | |
version <code class="literal">1.0.0</code> will generate an import with a version of | |
<code class="literal">[1.0.0,1.0.0]</code>, and a package that’s exported at version | |
<code class="literal">1.0.0</code> and version <code class="literal">2.0.0</code> will generate an import | |
with a version of <code class="literal">[1.0.0,2.0.0]</code>. | |
</p><p> | |
Web Application Bundles are not subject to the above manifest processing. | |
This is a change of behaviour compared to Virgo Web Server 2.1.x. | |
See (see <a class="link" href="ch08s05.html" title="8.5 Default Web Application Bundle Headers">Default Web | |
Application Bundle Headers</a>) if you need the old behaviour until you | |
have changed your WABs to match the new behaviour. | |
</p><p> | |
VTS supports ROOT.war as a default web application. The <code class="literal">Web-ContextPath</code> | |
of the deployed ROOT.war is set to the default web context path - <code class="literal">/</code>. | |
</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: System Bundle Package Exports"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.gif"></td><th align="left">System Bundle Package Exports</th></tr><tr><td align="left" valign="top"><p> | |
For further details on which packages are exported by the | |
OSGi system bundle, consult the <code class="filename">java6-server.profile</code> | |
file located in the <code class="literal">SERVER_HOME/lib</code> directory. | |
</p></td></tr></table></div></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript"> | |
_lf_cid = "LF_48be82fa"; | |
_lf_remora(); | |
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.6 Programmatic Access to the Servlet Context </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4.8 Working with Dependencies</td></tr></table></div></body></html> |