r1 - 24 Apr 2008 - 10:29:28 - TravisVachonYou are here: OSAF >  Developers Web  >  ChandlerServerSource > ChandlerServerJavascriptDev

Chandler Server Javascript Development

Developers interested in contributing or making modifications to the Dojo toolkit based Web UI can find the source code in $COSMO_ROOT/cosmo-js.

Development Environment Setup

It is common in Javascript development to test and debug against the version controlled copies of the code, eliminating the build step found in the development of a language like Java. To enable this workflow developers will need to perform two additional setup steps over and above those found on the server setup page.

Container Configuration

You will first need to configure your container server to follow symbolic links. By default, most containers do not follow symbolic links for security reasons. For development purposes, however, this can be extremely convenient.

To do this, set the allowLinking attribute of the appropriate <Context> element in your container configuration to =true. If you are using the bundled Tomcat server set up as described here you'll need to edit $SNARF_HOME/tomcat/conf/Catalina/localhost/chandler.xml and modify it as in the following example:

<Context docBase="/home/travis/dev/cosmo/cosmo/src/main/webapp"
                   allowLinking="true">
...
</Context>

js-dev Build Profile

Next, rebuild the Chandler Server webapp using the js-dev build profile. This will insert a symbolic link to the Javascript source code in place of the usual Javascript code taken from a Maven repository:

  • cd $COSMO_ROOT/cosmo
  • mvn -Pjs-dev clean compile war:inplace

You can now edit the code found in $COSMO_ROOT/cosmo-js/src. When you start the server you should see changes you make in these files in the Javascript served to the web browser.

To undo this and switch back to Javascript found in a Maven repository, do:

  • cd $COSMO_ROOT/cosmo
  • mvn clean compile war:inplace

Additional Resources

-- TravisVachon - 24 Apr 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.