Framework Client-Side Classes

Version 9.1 by David Avendasora on 2008/07/08 15:19

If you are using any frameworks other than the Apple-provided WebObjects frameworks that include client-side classes, you will need to manually copy the framework's client-side .jar files into your WebServerResources/Java directory and add an entry to the ClasspathClient.txt file for each one.

WebObjects seems to be able to find its own client-side classes from within the Library/Frameworks directory, but it cannot find any others.

For example, I have a framework named MyFoundation.framework that has a couple classes in it that are used by the client-side of my application. In order for WO to find these classes, they must be in a Jar located in the MyApp.woa/Contents/WebServerResources/Java/. You will then need to make sure that the ClasspathClient.txt classpath file has an entry pointing to it.


APPROOT/WebServerResources/Java/MyFoundation.jar

You can also modify the build.xml and javaclientbuild.xml files to go grab all the client-side jar files from the local frameworks directory (Usually /Library/Frameworks) using the following addition:

{{code|xml}}

<! the Java Client Client-Side Classes    >
<copy todir="${dest.dir}/${project.name}/WEB-INF/${project.name}.woa/Contents/WebServerResources/Java">
 <fileset dir="${wo.wolocalroot}/Library/Frameworks">
  <include name="/WebServerResources/Java/*.jar"/>
 </fileset>
 <mapper type="flatten"/>
</copy>

{{/code|xml}}