JChem db_search Example

The example can be found in the <JChem home>/examples/db_search directory.

Steps of installation:

  1. Make sure that all required software pieces to run JSP scripts using JChem Class Library are installed. Check if JSP scripts can be run.

    If you don not have an existing JSP capable web server, we recommend installing Apache Tomcat.

  2. Include all jar files located in <JChem home>\lib\ and the jar or zip file containing the JDBC driver in the classpath of the servlet server.
    Note : This is not the same as the system classpath.
    Tomcat instructions

    Don't forget to update these files whenever you install a new version of JChem.

  3. Create a web application for JChem.
    Tomcat instructions

  4. Initialize a database for structure handling using JChemManager.

  5. Create a table called editexample using JChemManager.

  6. Import an SD file containing chemical structures into the new table.

  7. When the example system is set up, try it by loading <JChem's URL>/examples/db_search/setup.jsp into your browser.

    Tomcat:
    If the web server is located on your machine on the default port (8080), load http://localhost:8080/jchem/examples/db_search/setup.jsp

    You can alter the following settings here:

    Modify the values of the

    * For the driver, url, username, password, and property table the following rules apply:

    Additional properties:

    There is a text area for defining some other properties for the example application. You will find some example variables here after installation.

    The <table_name>.queryConditions variables define conditions that can be set for a query. The fields have to be separated by semicolon. A default value for all structure tables can be defined by using the "default." tag before the queryConditions instead of the table name. For example:

        SCOTT.JSPEXAMPLE.queryConditions=cd_id;cd_molweight#Molweight
        default.queryConditions=cd_id#Id: 

    The text after the # character (if specified) will be written on the query page instead the database name of the field.

    Forms for displaying a result can be defined here as well.

    After setting all values you can store the settings and start using the example by pressing the Save changes button.

  8. The first page of the example is a login page. After the login, entered values will be stored in cookies and will appear on the next login.
    The page can be bypassed by defining the properties mentioned above in the setup.jsp.

  9. If you receive the message "Error: Maximum number of searches allowed per minute is exceeded. Please try it later", then please for a license key that allows more frequent searching.

  10. Please note that some less sophisticated databases like MS Access don't support parallel update or insert operations.

  11. Instructions for license installation can be found here: Installing licenses.
    The user account of the ChemAxon license should be set on the Properties>Log On tab of Apache Tomcat service.

If you have any problem concerning the installation of the example, visit our forum or .

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