Skip to content
teamoo edited this page Aug 12, 2010 · 11 revisions

Since there are so many different server options, and we expect to work on all of them, it will be useful to collect any gotcha’s we come across here.

Apache on OS X

When working on the Cappuccino frameworks you will need to compile them after each change, so it is convenient to symlink your test project’s “Frameworks” directory to $CAPP_BUILD/Release (assuming you have set up the tools and $CAPP_BUILD environment variable):


cd /path/to/testproject
ln -s $CAPP_BUILD/Release Frameworks

You can either load the sample project directly from the filesystem (file://path/to/testproject/index.html) or put it in your Sites directory and load it via Web Sharing (apache webserver). For the latter you must enable symlink following in Apache. See the following blog post:

Mac OS X, Web Sharing / Apache, and Symlinks

Microsoft IIS7

Apparently IIS (at least 7, maybe others), needs to have the mime type of file types it doesn’t understand set to something for Cappuccino to work. Specifically, you should set the following mime-type/extension pairs:


text/javascript for ".j"
text/xml for ".plist" and 
text/javascript for ".sj"

Glassfish

You need to have the mime type of file types it doesn’t understand set to something for Cappuccino to work. Specifically, you should set the following mime-type/extension pairs. This can be done in the web.xml:


<mime-mapping>
     <extension>j</extension>
     <mime-type>text/javascript</mime-type>
</mime-mapping>
<mime-mapping>
     <extension>plist</extension>
     <mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
      <extension>sj</extension>
      <mime-type>text/javascript</mime-type>
</mime-mapping>

You might also have to add the the cib extension:


<mime-mapping>
      <extension>cib</extension>
      <mime-type>application/cib</mime-type>
</mime-mapping>

The mappings need to be placed anywhere inside the tag.

Apache on Linux

If you encounter any issues, make sure that you added the mime types mentioned for the Glassfish server. The mime.types for apache are set in the mime.types file (should be in your httpd/conf folder).

Troubleshooting

If the wheel keeps spinning, open the script-console (in safari).

Cappuccino can tell you about many issues regarding the objective-j runtime (which are no “server-side” issues btw).

Regarding server-side issues:

You should see lines starting with “XHR finished loading …”.
Check if the extension of the last entry is included in your mime-type configuration.

You might also see some warnings that tell you that the content-type of a file didn’t quite match what your browser made out of it.
For example transferring png images with content-type text/html is something safari knows to treat as an image on the client side, but you should fix such issues, too.

If you still have problems, try looking into the http response header (e.g. with Live HTTP headers plugin for firefox) and check what you received from the server (especially the content-type).