fancyfoods.food;version="[1.0, 2.0)", javax.naming,
Finally, you need to add a new entry into your web.xml to register our servlet:
Try adding the updated fancyfoods.web to the load directory before the fancy-
foods.api bundle. There's no need to restart the OSG i container; file changes will be
detected and the bundle will be automatically refreshed. When you list the bundles
with ss , fancyfoods.web will only be INSTALLED instead of STARTED . This means some
of its dependencies were missing. When you copy across the fancyfoods.api JAR into
the load directory, the fancyfoods.web bundle will spontaneously leap into life and
become STARTED .
When you load the SayHello JNDI web page, you should see a helpful message
explaining that there are no special offers (figure 2.16 ).
Figure 2.16 Before
the aggregator bundle
is started, the Fancy
Foods welcome page
won't be able to dis-
play any special offers.
After dropping your aggregator into the load directory, a CurrentOffers object will
be available in JNDI , but there won't be any special offers available, so the web page
will show an empty table. Adding the chocolate bundle to the load directory will
cause the chocolate offer to be injected into the offer aggregator (see figure 2.17).
Figure 2.17 After
the aggregator and
are loaded, the page
will display a special
offer for chocolate.
Search WWH ::