How to access data in IJC using URLs



This document describes how to access data in IJC using a URL. This lets you do things like:

IJC URLs operate on two different levels:

  1. They can refer to data in a shared project using information in any of the databases that are defined in this shared project. In this mode a URL can be generated by one person and used by a different person in their own copy of IJC. To use this mechanism a shared project must be set up.
  2. The information in a shared project can be refered to using a HTTP based URL. In this mode a Java Web Start installation of IJC can be referred to so that clicking on the link for the URL (e.g. in an email or web page) loads IJC, opens the shared project and then opens the data that is specified. To use this meachanism the adminstrator needs to install the IJC Server application to your web server as well as the shared projects.

What you need

IJC URLs are used with shared projects. Only by using a shared project is it possible for a URL to refer to the same thing in diferent running copies of IJC. To deploy a shared project you need a standard HTTP server.

You must have an IJC enterprise license to deploy shared projects and use IJC URLs.

To deploy the web application that provides the HTTP URLs (mechanism 2 above) you must have a web server that supports Servlets (e.g Tomcat or most other J2EE servers). You must also deploy the Java Web start version of IJC to your server.

Steps

The exact steps you need to follow depends on which mechanism you are using. See above for details.

1. Prepare the shared project files

Create the .ijp and .zip files that are needed for shared project configurations. See here for details of these files. Do not deploy these files yet.

2. Deploy the Java Web Start version of IJC

See here for details of how to set this up.

3. Deploy the IJC Server

The IJC is contained in the file UrlWebApp.war that can be downloaded from the appropriate Java Web Start launch page (e.g. http://www.chemaxon.com/instantjchem-jws/stable/).

If you have a servlet container that supports Servlet 2.4/JSP 2.0 or later, such as Glassfish, Tomcat 5, JBoss, Jetty 6, etc., then you can deploy URLWebApp.war as you would any WAR file. e.g. to install on Tomcat, simply copy UrlWebApp.war to $TOMCAT_HOME/webapps, then access http://yourhost/URLWebApp.war.

If you do not have a servlet container such as Tomcat you can alternatively run the server application directly from the commandline:

java -jar UrlWebApp.war
This starts a web server contained within the UrlWebApp.war file. More details and possible command line arguments can be found here.

Once deployed connect to the server with a web browser using a URL like this:
http://yourhost.com:8080/UrlWebApp/ from the server machine.

Follow the instructions on that page. This basically involves copying the file master.jnlp from the deployed JWS app to a location where it is seen by the IJC Server and editing the application-desc element to look like this:

    <application-desc main-class="com.im.ijc.jnlpinstaller.Main">
        <argument>--openUrl</argument>
        <argument>$$url</argument> 
    </application-desc>
            
and then deploying the shared project(s) so that the IJC server can see them. The actual web page gives you full details.

4. Generate IJC URLs.

Once installed IJC URLs can be used. Create these using the 'Generate URL' function within IJC. See the user documentation for more details.

Problems?

If you find problems or have any questions then please report them to the IJC forum.



Copyright © 1999-2008 ChemAxon Ltd.    All rights reserved.