Cisco Cisco Unified Customer Voice Portal 10.5(1) Developer's Guide

Page of 79
C
HAPTER 
2:
 
C
ISCO 
CVP
 
V
OICE
XML
 API Introduction
   
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
Note that when the Server initializes, it first loads the classes in 
common
 and then loads each 
application’s classes. Due to the way Java classloaders work, if a Java class appears in both the 
common
 folder and an application’s 
java
 folder, the one in 
common
 will take precedence and the 
one in the application’s 
java
 folder will not be loaded. Also note that due to the order in which 
these classes are loaded, the developer cannot place a class in 
common
 that refers to a class that 
only appears in an application’s 
java
 folder since the classes in 
common
 are loaded first. 
Subdirectories of the Java Folder 
The 
java
 folder of a Studio project and a Server application folder contain two subdirectories 
named 
application
 and 
util
. Each folder encapsulates Java classes used for different 
purposes, their distinctions applying primarily to how the application works within CVP 
VoiceXML Server. 
The 
application
 folder should contain all Java code for components that are used by the 
application. Note that in CVP VoiceXML Studio, any custom configurable elements that are 
utilized only by the application would be placed in this folder and will appear in CVP 
VoiceXML Studio’s element pane under the folder named “Local Elements”. The call flow 
editor for that application must be closed and reopened in order for newly copied local elements 
to appear in the element pane. 
The second subdirectory of the 
java
 folder is the 
util
 folder. This is used for Java libraries that 
provide the application with utilities unaffiliated with Cisco CVP VoiceXML (such as math 
libraries, XML parsing libraries, etc.).  
There are several notes that must be made concerning which folder to use: 
• 
Any class that refers to CVP VoiceXML-specific API classes cannot be deployed in the 
util
 
folder. If the class is application-specific, it must be placed in the 
application
 folder of that 
application. If the class is to be shared across all applications, it must be placed in the 
common
 
folder of the Server. 
• 
The classes in the 
util
 folder will not be reloaded when the application is updated using the 
updateApp
 administration script. If this behavior is not desired or the utility libraries are 
frequently updated, place these files in the 
application
 folder. See the User Guide, Chapter 
3 in the section describing the update capabilities for more information. 
• 
Utility classes that do not refer to CVP VoiceXML classes at all (such as third-party 
libraries) can be placed anywhere within the 
CLASSPATH
 of the application server. For 
example, on the Apache Jakarta Tomcat application server, a library for connecting to a 
mainframe system can be placed in 
TOMCAT_HOME/common/lib
 rather than any CVP 
VoiceXML directory. 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
14