Wiki source code of Framework Client-Side Classes

Last modified by David Avendasora on 2008/07/08 15:23

Show last authors
1 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 project's WebServerResources/Java directory (and remember to always update them) or have Ant automatically copy them there when building/installing by modifying the build.xml and [[javaclientbuild.xml>>doc:documentation.Home.Development Architecture.Java Client.Java Client-WebStart Incremental Build.WebHome]] files to go grab all the client-side jar files from the local frameworks directory (Usually /Library/Frameworks) using the following addition:
2
3 {{code 0="xml"}}
4
5 <!-- the Java Client Client-Side Classes -->
6 <copy todir="${dest.dir}/${project.name}/WEB-INF/${project.name}.woa/Contents/WebServerResources/Java">
7 <fileset dir="${wo.wolocalroot}/Library/Frameworks">
8 <include name="**/WebServerResources/Java/*.jar"/>
9 </fileset>
10 <mapper type="flatten"/>
11 </copy>
12
13 {{/code}}
14
15 Either way, you will also need to add an entry to the project's ClasspathClient.txt file for each one.
16
17 WebObjects seems to be able to find its own client-side classes from within the Library/Frameworks directory, but it cannot find any others.
18
19 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 like so:
20
21 {{code}}
22
23 APPROOT/WebServerResources/Java/MyFoundation.jar
24
25 {{/code}}
26
27 You can also